added toml formatter, split each language into lsp and format
This commit is contained in:
parent
56d2fe2922
commit
67c8d10658
4 changed files with 184 additions and 125 deletions
|
|
@ -56,11 +56,12 @@ return {
|
|||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
lua = nixCats("lang.lua") and { "stylua" } or nil,
|
||||
nix = nixCats("lang.nix") and { "alejandra" } or nil,
|
||||
rust = nixCats("lang.rust") and { "rustfmt", lsp_format = "fallback" } or nil,
|
||||
haskell = nixCats("lang.haskell") and { "ormolu" } or nil,
|
||||
proto = nixCats("lang.protobuf") and { "buf" } or nil,
|
||||
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,
|
||||
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,
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
return {
|
||||
{
|
||||
"vim-fugitive",
|
||||
for_cat = "git",
|
||||
enabled = nixCats("git") or false,
|
||||
cmd = { "Git", "Gvdiffsplit" },
|
||||
},
|
||||
{
|
||||
"resolve-nvim",
|
||||
for_cat = "git",
|
||||
enabled = nixCats("git") or false,
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
after = function(plugin)
|
||||
require("resolve").setup({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue