update nixvim config

This commit is contained in:
2026-07-31 01:20:08 +02:00
parent 0b73b99654
commit ee0447931e
7 changed files with 305 additions and 30 deletions
@@ -0,0 +1,35 @@
{ pkgs, ... }:
{
programs.nixvim.extraPackages = with pkgs; [
stylua
nixfmt
];
programs.nixvim.plugins = {
conform-nvim = {
enable = true;
settings = {
format_on_save = ''
function(bufnr)
-- Disable "format_on_save lsp_fallback" for lanuages that don't
-- have a well standardized coding style. You can add additional
-- lanuages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
if disable_filetypes[vim.bo[bufnr].filetype] then
return nil
else
return {
timeout_ms = 500,
lsp_format = "fallback",
}
end
end
'';
formatters_by_ft = {
lua = [ "stylua" ];
nix = [ "nixfmt" ];
};
};
};
};
}