mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
feat(nvim-formatting): Auto install required formatters through mason
- Sort configurations by ft - Add formatters to lsp so they can be auto installed by mason
This commit is contained in:
@@ -6,22 +6,23 @@ return {
|
||||
event = { "BufWritePre" },
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
cs = { "csharpier" },
|
||||
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 },
|
||||
svelte = { "prettierd", "prettier", stop_after_first = true },
|
||||
css = { "prettierd", "prettier", stop_after_first = true },
|
||||
html = { "prettierd", "prettier", stop_after_first = true },
|
||||
json = { "prettierd", "prettier", stop_after_first = true },
|
||||
graphql = { "prettierd", "prettier", stop_after_first = true },
|
||||
yaml = { "yamlfmt", "prettierd", stop_after_first = true },
|
||||
markdown = { "markdownlint", "markdown-toc" },
|
||||
lua = { "stylua" },
|
||||
python = { "black" },
|
||||
sh = { "shfmt", "shellharden", stop_after_first = true },
|
||||
bash = { "shfmt", "shellharden", stop_after_first = true },
|
||||
cs = { "csharpier" },
|
||||
css = { "prettierd", "prettier", stop_after_first = true },
|
||||
graphql = { "prettierd", "prettier", stop_after_first = true },
|
||||
html = { "prettierd", "prettier", stop_after_first = true },
|
||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
|
||||
json = { "prettierd", "prettier", stop_after_first = true },
|
||||
lua = { "stylua" },
|
||||
markdown = { "markdownlint", "markdown-toc" },
|
||||
python = { "black" },
|
||||
rust = { "rustfmt" },
|
||||
sh = { "shfmt", "shellharden", stop_after_first = true },
|
||||
svelte = { "prettierd", "prettier", stop_after_first = true },
|
||||
typescript = { "prettierd", "prettier", stop_after_first = true },
|
||||
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
|
||||
yaml = { "yamlfmt", "prettierd", stop_after_first = true },
|
||||
zsh = { "shfmt", "shellharden", stop_after_first = true },
|
||||
["_"] = { "trim_whitespace" },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user