mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 03:47:37 +00:00
lsp/presets/ty: init
This commit is contained in:
parent
04aeeb2938
commit
212c345c3b
2 changed files with 25 additions and 0 deletions
|
|
@ -17,6 +17,7 @@
|
|||
./tofu-ls.nix
|
||||
./tombi.nix
|
||||
./twig-language-server.nix
|
||||
./ty.nix
|
||||
./typescript-go.nix
|
||||
./typescript-language-server.nix
|
||||
./vala-language-server.nix
|
||||
|
|
|
|||
24
modules/plugins/lsp/presets/ty.nix
Normal file
24
modules/plugins/lsp/presets/ty.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.ty;
|
||||
in {
|
||||
options.vim.lsp.presets.ty = {
|
||||
enable = mkEnableOption "the ty Python Language Server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.lsp.servers.ty = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.ty) "server"];
|
||||
root_markers = [".git"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue