diff --git a/modules/home-manager/cli/neovim/default.nix b/modules/home-manager/cli/neovim/default.nix index d8c67ca..f6556e9 100644 --- a/modules/home-manager/cli/neovim/default.nix +++ b/modules/home-manager/cli/neovim/default.nix @@ -80,6 +80,11 @@ in cmp-path cmp-cmdline cmp_luasnip + { + plugin = conform-nvim; + type = "lua"; + config = (builtins.readFile ./files/conform.lua); + } { plugin = fzf-lua; type = "lua"; diff --git a/modules/home-manager/cli/neovim/files/conform.lua b/modules/home-manager/cli/neovim/files/conform.lua new file mode 100644 index 0000000..ff3d6d8 --- /dev/null +++ b/modules/home-manager/cli/neovim/files/conform.lua @@ -0,0 +1,11 @@ +require("conform").setup({ + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_format = "never", + }, + formatters_by_ft = { + yaml = {"yamlfmt"}, + ["_"] = { "trim_whitespace" }, + } +})