mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 11:55:22 +00:00
lsp/presets/zls: init
This commit is contained in:
parent
19d6e9f53c
commit
84f925e9c2
2 changed files with 26 additions and 0 deletions
25
modules/plugins/lsp/presets/zls.nix
Normal file
25
modules/plugins/lsp/presets/zls.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.vim.lsp.presets.zls;
|
||||
in {
|
||||
options.vim.lsp.presets.zls = {
|
||||
enable = mkEnableOption "the Zig Language Server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.lsp.servers.zls = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.zls)];
|
||||
root_markers = [".git" "zls.json"];
|
||||
workspace_required = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue