mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 03:47:37 +00:00
lsp/presets/ruff: init
This commit is contained in:
parent
212c345c3b
commit
5ee04aa8ad
2 changed files with 25 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
./qmlls.nix
|
||||
./r-languageserver.nix
|
||||
./ruby-lsp.nix
|
||||
./ruff.nix
|
||||
./solargraph.nix
|
||||
./sqls.nix
|
||||
./svelte-language-server.nix
|
||||
|
|
|
|||
24
modules/plugins/lsp/presets/ruff.nix
Normal file
24
modules/plugins/lsp/presets/ruff.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.vim.lsp.presets.ruff;
|
||||
in {
|
||||
options.vim.lsp.presets.ruff = {
|
||||
enable = mkEnableOption "the Ruff Python Language Server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.lsp.servers.ruff = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.ruff) "server"];
|
||||
root_markers = [".git"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue