Skip to content

Commit e7eaf86

Browse files
committed
fix(conform): disable formatters for jsonc to preserve comments
fixjson and prettier both strip comments from jsonc files; clear the formatter list and fall back to lsp formatting via jsonls which preserves comments natively
1 parent 9271c1a commit e7eaf86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/modules/configs/completion/conform.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ return function()
103103
javascript = { "prettier" },
104104
javascriptreact = { "prettier" },
105105
json = { "fixjson", "prettier" },
106-
jsonc = { "fixjson", "prettier" },
106+
jsonc = {}, -- fixjson/prettier strip comments; fallback to LSP (jsonls) for JSONC formatting
107107
lua = { "stylua" },
108108
markdown = { "mdsf" },
109109
nix = { "nixfmt", "statix" },

0 commit comments

Comments
 (0)