lsp/presets/pyrefly: init

This commit is contained in:
Snoweuph 2026-04-11 17:38:26 +02:00
commit 6eb193c437
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
2 changed files with 25 additions and 0 deletions

View file

@ -4,6 +4,7 @@
./deno.nix ./deno.nix
./harper.nix ./harper.nix
./lemminx.nix ./lemminx.nix
./pyrefly.nix
./pyright.nix ./pyright.nix
./python-lsp-server.nix ./python-lsp-server.nix
./qmlls.nix ./qmlls.nix

View 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.pyrefly;
in {
options.vim.lsp.presets.pyrefly = {
enable = mkEnableOption "the Pyrefly Language Server";
};
config = mkIf cfg.enable {
vim.lsp.servers.pyrefly = {
enable = true;
cmd = [(getExe pkgs.pyrefly) "lsp"];
root_markers = [".git" "pyrefly.toml"];
};
};
}