nvim: move to services we do not specify a pkgset
This commit is contained in:
parent
465a6b19d1
commit
11b98d8146
45 changed files with 38 additions and 37 deletions
54
services/nvim/lsp/python.nix
Normal file
54
services/nvim/lsp/python.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.optionalAttrs (lib.elem "nvim::lsp::python" config.machine.pkgs) {
|
||||
pyright = {
|
||||
cmd = [
|
||||
"${pkgs.pyright}/bin/pyright-langserver"
|
||||
"--stdio"
|
||||
];
|
||||
settings = {
|
||||
pyright = {
|
||||
disableOrganizeImports = true;
|
||||
};
|
||||
python = {
|
||||
# analysis = {
|
||||
# ignore = { '*' },
|
||||
# },
|
||||
};
|
||||
};
|
||||
};
|
||||
ruff = {
|
||||
cmd = [
|
||||
"${pkgs.ruff}/bin/ruff"
|
||||
"server"
|
||||
"--preview"
|
||||
];
|
||||
init_options = {
|
||||
settings = {
|
||||
# Modification to any of these settings has no effect.
|
||||
enable = true;
|
||||
ignoreStandardLibrary = true;
|
||||
organizeImports = true;
|
||||
fixAll = true;
|
||||
lineLength = 120;
|
||||
lint = {
|
||||
enable = true;
|
||||
run = "onType";
|
||||
};
|
||||
};
|
||||
};
|
||||
on_attach =
|
||||
_: # lua
|
||||
''
|
||||
function(client, bufnr)
|
||||
if client.name == 'ruff' then
|
||||
client.server_capabilities.hoverProvider = false;
|
||||
end
|
||||
end'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue