Auto install conform formatters and adjusted how formatters are configured
This commit is contained in:
19
nvim/dot-config/nvim/lua/tools/format.lua
Normal file
19
nvim/dot-config/nvim/lua/tools/format.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
c = { "clang-format" },
|
||||
cpp = { "clang-format" },
|
||||
go = { "goimports", "gofmt" },
|
||||
python = { "ruff_organize_imports", "ruff_format" },
|
||||
rust = { "rustfmt" },
|
||||
javascript = { "prettierd" },
|
||||
javascriptreact = { "prettierd" },
|
||||
typescript = { "prettierd" },
|
||||
typescriptreact = { "prettierd" },
|
||||
css = { "prettierd" },
|
||||
markdown = { "prettierd" },
|
||||
yaml = { "prettierd" },
|
||||
lua = { "stylua" },
|
||||
json = { "jq" },
|
||||
toml = { "taplo" },
|
||||
-- ["*"] = { "injected" },
|
||||
["_"] = { "trim_whitespace", "trim_newlines" },
|
||||
}
|
||||
Reference in New Issue
Block a user