feat:add_nixvim

This commit is contained in:
dichgrem
2025-09-21 15:54:31 +08:00
parent c36f91562d
commit 8016a1173d
64 changed files with 3608 additions and 30 deletions

View File

@@ -0,0 +1,44 @@
{pkgs, ...}: {
plugins = {
dap.extensions.dap-python.enable = true;
conform-nvim.settings = {
formatters_by_ft.python = [
"ruff_format"
"ruff_organize_imports"
];
};
lint = {
lintersByFt.python = ["mypy"];
linters.mypy = {
cmd = "${pkgs.mypy}/bin/mypy";
args = ["--ignore-missing-imports"];
};
};
lsp.servers = {
pyright = {
enable = true;
extraOptions.settings = {
# Using Ruff's import organizer
pyright.disableOrganizeImports = true;
python.analysis = {
# Ignore all files for analysis to exclusively use Ruff for linting
ignore.__raw = ''{ '*' }'';
};
};
};
ruff = {
enable = true;
onAttach.function = ''
if client.name == 'ruff' then
-- Disable hover in favor of Pyright
client.server_capabilities.hoverProvider = false
end
'';
};
};
};
}