Add nvim-lazy submodule and add plugin configuration.
This commit is contained in:
parent
f545e30831
commit
b1ad0b623a
39 changed files with 1599 additions and 0 deletions
44
pkgsets/nvim/lsp/python.nix
Normal file
44
pkgsets/nvim/lsp/python.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.optionalString (lib.elem "nvim::lsp::python" config.machine.pkgs) # lua
|
||||
''
|
||||
lspconfig.pyright.setup({
|
||||
cmd = {"${pkgs.pyright}/bin/pyright-langserver", "--stdio"},
|
||||
settings = {
|
||||
pyright = {
|
||||
disableOrganizeImports = true,
|
||||
},
|
||||
python = {
|
||||
-- analysis = {
|
||||
-- ignore = { '*' },
|
||||
-- },
|
||||
},
|
||||
},
|
||||
})
|
||||
lspconfig.ruff.setup({
|
||||
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,
|
||||
lint = {
|
||||
enable = true,
|
||||
run = 'onType',
|
||||
},
|
||||
},
|
||||
},
|
||||
on_attach = 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