feat: add toml formatting
This commit is contained in:
parent
e5f0d9bc25
commit
36de7c527d
1 changed files with 15 additions and 0 deletions
|
@ -11,11 +11,26 @@ return {
|
||||||
javascriptreact = { "prettierd" },
|
javascriptreact = { "prettierd" },
|
||||||
json = { "prettierd" },
|
json = { "prettierd" },
|
||||||
jsonc = { "prettierd" },
|
jsonc = { "prettierd" },
|
||||||
|
toml = { "taplo" },
|
||||||
typescript = { "prettierd" },
|
typescript = { "prettierd" },
|
||||||
typescriptreact = { "prettierd" },
|
typescriptreact = { "prettierd" },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
},
|
},
|
||||||
|
formatters = {
|
||||||
|
taplo = {
|
||||||
|
args = function()
|
||||||
|
-- conform.nvim does not parse bash envvars, so we do it ourselves
|
||||||
|
local CONFIG_PATH = os.getenv("HOME") .. "/.config/taplo/taplo.toml"
|
||||||
|
return {
|
||||||
|
"format",
|
||||||
|
"--config",
|
||||||
|
CONFIG_PATH,
|
||||||
|
"-",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue