-
|
I know I can do something like vim.api.nvim_create_autocmd("FileType", {
pattern = "sh",
callback = function()
vim.bo.shiftwidth = 4
vim.bo.softtabstop = 4
vim.bo.expandtab = true
end,
})but is there an idiomatic (less boiler-plate) way to pass per-file formatting defaults e.g. to conform or something like that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The current method for doing this is using Lua. Alternatively, you can append an additional directory to the runtime and dump your ftplugin dirs in there. Though, neither are idiomatic. #1304 is relevant; I'm planning to add a Nix interface for automatically creating a runtime directory that creates ftplugin dirs and their contents. For the time being, doing it with Lua is the best (and only) way to go. |
Beta Was this translation helpful? Give feedback.
The current method for doing this is using Lua. Alternatively, you can append an additional directory to the runtime and dump your ftplugin dirs in there. Though, neither are idiomatic.
#1304 is relevant; I'm planning to add a Nix interface for automatically creating a runtime directory that creates ftplugin dirs and their contents. For the time being, doing it with Lua is the best (and only) way to go.