mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 11:55:22 +00:00
lsp/presets/nixd: init
This commit is contained in:
parent
239f7d4c44
commit
11eddae2eb
2 changed files with 25 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
./intelephense.nix
|
||||
./lemminx.nix
|
||||
./nil.nix
|
||||
./nixd.nix
|
||||
./nushell.nix
|
||||
./ocaml-lsp.nix
|
||||
./ols.nix
|
||||
|
|
|
|||
24
modules/plugins/lsp/presets/nixd.nix
Normal file
24
modules/plugins/lsp/presets/nixd.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.nixd;
|
||||
in {
|
||||
options.vim.lsp.presets.nixd = {
|
||||
enable = mkEnableOption "the NixD Language Server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.lsp.servers.nixd = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.nixd)];
|
||||
root_markers = [".git"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue