NVim: formatter with conform
This commit is contained in:
parent
9cebf5192d
commit
b325b71940
1 changed files with 31 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
let vp = pkgs.vimPlugins; in {
|
||||
home.packages = [ pkgs.nodePackages.prettier ];
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -312,6 +313,33 @@ let vp = pkgs.vimPlugins; in {
|
|||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vp.conform-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
svelte = { "prettier" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
json = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
markdown = { "prettier" },
|
||||
graphql = { "prettier" },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vp.obsidian-nvim;
|
||||
type = "lua";
|
||||
|
|
@ -332,6 +360,9 @@ let vp = pkgs.vimPlugins; in {
|
|||
'';
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
# settings = { ignorecase = true; };
|
||||
# coc.enable = true;
|
||||
# extraConfig = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue