refactor: extract conform formatters to custom plugin
This commit is contained in:
parent
47f7a55f7b
commit
ff521d7d24
11
init.lua
11
init.lua
|
|
@ -728,17 +728,6 @@ require('lazy').setup({
|
|||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
|
||||
-- my customizations
|
||||
json = { 'jq' },
|
||||
sarif = { 'jq' },
|
||||
python = { 'ruff_format', 'ruff_organize_imports' },
|
||||
html = { 'prettier' },
|
||||
javascript = { 'prettier' },
|
||||
typescript = { 'prettier' },
|
||||
typescriptreact = { 'prettier' },
|
||||
markdown = { 'markdownlint' },
|
||||
yaml = { 'prettier' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
'stevearc/conform.nvim',
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
json = { 'jq' },
|
||||
sarif = { 'jq' },
|
||||
python = { 'ruff_format', 'ruff_organize_imports' },
|
||||
html = { 'prettier' },
|
||||
javascript = { 'prettier' },
|
||||
typescript = { 'prettier' },
|
||||
typescriptreact = { 'prettier' },
|
||||
markdown = { 'markdownlint' },
|
||||
yaml = { 'prettier' },
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Reference in New Issue