neovim-flake/modules/plugins/lsp/presets/python-lsp-server.nix

25 lines
531 B
Nix
Raw Normal View History

2026-04-11 17:32:27 +02:00
{
config,
lib,
pkgs,
...
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
2026-04-13 08:34:26 +02:00
inherit (lib.nvim.types) mkLspPresetEnableOption;
2026-04-11 17:32:27 +02:00
cfg = config.vim.lsp.presets.python-lsp-server;
in {
options.vim.lsp.presets.python-lsp-server = {
2026-04-13 08:34:26 +02:00
enable = mkLspPresetEnableOption "python-lsp-server" "Python" [];
2026-04-11 17:32:27 +02:00
};
config = mkIf cfg.enable {
vim.lsp.servers.python-lsp-server = {
enable = true;
cmd = [(getExe pkgs.python3Packages.python-lsp-server)];
root_markers = [".git"];
};
};
}