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