mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
add ruff as lsp
This commit is contained in:
parent
c002e8f572
commit
0bbb039b7f
2 changed files with 20 additions and 1 deletions
|
@ -59,7 +59,11 @@ isMaximal: {
|
|||
go.enable = isMaximal;
|
||||
lua.enable = isMaximal;
|
||||
zig.enable = isMaximal;
|
||||
python.enable = isMaximal;
|
||||
python = {
|
||||
enable = true;
|
||||
format.type = "ruff";
|
||||
lsp.server = "ruff";
|
||||
};
|
||||
typst.enable = isMaximal;
|
||||
rust = {
|
||||
enable = isMaximal;
|
||||
|
|
|
@ -46,6 +46,21 @@
|
|||
'';
|
||||
};
|
||||
|
||||
ruff = {
|
||||
package = pkgs.ruff;
|
||||
lspConfig = ''
|
||||
lspconfig.ruff.setup{
|
||||
capabilities = capabilities;
|
||||
on_attach = default_on_attach;
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/ruff", "server"}''
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
python-lsp-server = {
|
||||
package = pkgs.python-lsp-server;
|
||||
lspConfig = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue