feat: mirgated to neovims internal plugin manager
This commit is contained in:
@@ -1,24 +1,26 @@
|
||||
vim.pack.add({
|
||||
'https://github.com/stevearc/conform.nvim'
|
||||
'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,
|
||||
},
|
||||
},
|
||||
formatters_by_ft = {
|
||||
cpp = { "clang-format" },
|
||||
python = { "black" },
|
||||
typescript = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
},
|
||||
-- Set default options
|
||||
default_format_opts = {
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
-- Set up format-on-save
|
||||
format_on_save = { timeout_ms = 10000 },
|
||||
-- Customize formatters
|
||||
formatters = {
|
||||
-- ['clang-format'] = {
|
||||
-- append_args = function(self, ctx)
|
||||
-- return { "-style={IndentWidth: 4}" }
|
||||
-- end,
|
||||
-- },
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user