🔧 Overhaul for performance
This commit is contained in:
parent
9e1b046074
commit
6365ecfe66
37 changed files with 487 additions and 345 deletions
33
.config/nvim/lua/plugins/conform.lua
Normal file
33
.config/nvim/lua/plugins/conform.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
return {
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
python = { "isort", "black" },
|
||||
lua = { "stylua" },
|
||||
css = { "prettierd" },
|
||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
typescript = { "prettierd", "prettier", stop_after_first = true },
|
||||
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
|
||||
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
|
||||
html = { "prettierd", "prettier", stop_after_first = true },
|
||||
pug = { "prettierd", "prettier", stop_after_first = true },
|
||||
vue = { "prettierd", "prettier", stop_after_first = true },
|
||||
sql = { "sql_formatter" },
|
||||
rust = { "rustfmt" },
|
||||
golang = { "gofmt" },
|
||||
sh = { "shfmt" },
|
||||
json = { "jq", "deno_fmt", stop_after_first = true },
|
||||
toml = { "taplo" },
|
||||
yaml = { "yq" },
|
||||
markdown = { "deno_fmt" },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
async = false,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue