neovim: add clang_format and enable auto format
This commit is contained in:
parent
79d396ddfd
commit
9ad02124d7
|
@ -22,14 +22,17 @@ return {
|
|||
enabled = true, -- enable or disable format on save globally
|
||||
allow_filetypes = { -- enable format on save for specified filetypes only
|
||||
-- "go",
|
||||
"c",
|
||||
"cpp",
|
||||
"h",
|
||||
"javascript",
|
||||
"jsx",
|
||||
"lua",
|
||||
"nix",
|
||||
"rust",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"svelte",
|
||||
},
|
||||
ignore_filetypes = { -- disable format on save for specified filetypes
|
||||
-- "python",
|
||||
|
|
|
@ -12,6 +12,7 @@ return {
|
|||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
config.sources = {
|
||||
-- Set a formatter
|
||||
null_ls.builtins.formatting.clang_format,
|
||||
null_ls.builtins.formatting.nixfmt,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
|
|
Loading…
Reference in a new issue