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