added leptosfmt
This commit is contained in:
parent
4321b6f6c3
commit
c5416f0b92
2 changed files with 18 additions and 1 deletions
|
|
@ -58,7 +58,18 @@ return {
|
|||
formatters_by_ft = {
|
||||
lua = nixCats("lang.lua.format") and { "stylua" } or nil,
|
||||
nix = nixCats("lang.nix.format") and { "alejandra" } or nil,
|
||||
rust = nixCats("lang.rust.format") and { "rustfmt", lsp_format = "fallback" } or nil,
|
||||
rust = (function()
|
||||
if not nixCats("lang.rust.format") then
|
||||
return nil
|
||||
end
|
||||
local formatters = {}
|
||||
if nixCats("lang.rust.formatters.leptos") then
|
||||
table.insert(formatters, "leptosfmt")
|
||||
end
|
||||
table.insert(formatters, "rustfmt")
|
||||
formatters.lsp_format = "fallback"
|
||||
return formatters
|
||||
end)(),
|
||||
haskell = nixCats("lang.haskell.format") and { "ormolu" } or nil,
|
||||
proto = nixCats("lang.protobuf.format") and { "buf" } or nil,
|
||||
toml = nixCats("lang.toml.format") and { "taplo" } or nil,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue