Added Nixvim

This commit is contained in:
2025-12-26 23:02:04 +01:00
parent 83841223bb
commit f39de85d57
20 changed files with 722 additions and 22 deletions

42
home/neovim/lint.nix Normal file
View File

@@ -0,0 +1,42 @@
{ pkgs, ... }:
{
# nvim-lint: Asynchronous linter that runs external linting tools
# to find errors and style issues without blocking the editor.
# Runs automatically after saving files.
programs.nixvim = {
plugins.lint = {
enable = true;
# Configure linters for each filetype
lintersByFt = {
lua = [ "luacheck" ];
nix = [ "statix" ]; # Nix static analyzer
python = [ "ruff" ];
javascript = [ "eslint" ];
rust = [ "clippy" ];
# rasi has no common linter
};
# Trigger linting after saving a file
autoCmd = {
event = [ "BufWritePost" ];
callback = {
__raw = ''
function()
require('lint').try_lint()
end
'';
};
};
};
# Install linter binaries
extraPackages = with pkgs; [
lua54Packages.luacheck
statix
ruff
nodePackages.eslint
clippy
];
};
}