feat: migrated plugin manager from lazy to vim.pack
This commit is contained in:
24
.config/nvim/lua/plugins/conform.lua
Normal file
24
.config/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
vim.pack.add({
|
||||
'https://github.com/stevearc/conform.nvim'
|
||||
})
|
||||
|
||||
require('conform').setup({
|
||||
formatters_by_ft = {
|
||||
cpp = { "clang-format" },
|
||||
python = { "black" }
|
||||
},
|
||||
-- Set default options
|
||||
default_format_opts = {
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
-- Set up format-on-save
|
||||
format_on_save = { timeout_ms = 1000 },
|
||||
-- Customize formatters
|
||||
formatters = {
|
||||
['clang-format'] = {
|
||||
append_args = function(self, ctx)
|
||||
return { "-style={IndentWidth: 4}" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user