feat(nvim): Replace formatter with conform
This commit is contained in:
parent
f872b0e054
commit
d98afc2ee5
2 changed files with 7 additions and 20 deletions
|
@ -52,7 +52,6 @@ in
|
|||
nvim-web-devicons
|
||||
FTerm-nvim
|
||||
cmp-cmdline
|
||||
formatter-nvim
|
||||
]);
|
||||
# Formatting
|
||||
extraPackages = with pkgs; [
|
||||
|
@ -96,25 +95,6 @@ in
|
|||
-- require("dressing").setup()
|
||||
end
|
||||
|
||||
do -- Setup formatter.nvim
|
||||
-- local util = require "formatter.util"
|
||||
require("formatter").setup {
|
||||
logging = true,
|
||||
log_level = vim.log.levels.WARN,
|
||||
["*"] = { require("formatter.filetypes.any").remove_trailing_whitespace },
|
||||
-- Filetype Formatting
|
||||
c = { require("formatter.filetypes.c").clangformat },
|
||||
sh = { require("formatter.filetypes.sh").shfmt },
|
||||
cpp = { require("formatter.filetypes.cpp").clangformat },
|
||||
lua = { require("formatter.filetypes.lua").stylua },
|
||||
nix = { require("formatter.filetypes.nix").nixpkgs_fmt },
|
||||
zig = { require("formatter.filetypes.zig").zigfmt },
|
||||
rust = { require("formatter.filetypes.rust").rustfmt },
|
||||
toml = { require("formatter.filetypes.toml").taplo },
|
||||
yaml = { require("formatter.filetypes.yaml").yamlfmt },
|
||||
}
|
||||
end
|
||||
|
||||
do -- Setup idris2-nvim
|
||||
require("idris2").setup { }
|
||||
end
|
||||
|
|
|
@ -144,4 +144,11 @@
|
|||
lua = true;
|
||||
options.desc = "Find Quickfix";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>w";
|
||||
action = "require'conform'.format";
|
||||
lua = true;
|
||||
options.desc = "Format buffer";
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue