lsp/presets/tofu-ls: init

This commit is contained in:
Snoweuph 2026-04-11 16:05:47 +02:00
commit e9a85c3796
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
2 changed files with 25 additions and 0 deletions

View file

@ -6,6 +6,7 @@
./taplo.nix
./texlab.nix
./tinymist.nix
./tofu-ls.nix
./tombi.nix
./twig-language-server.nix
./typescript-go.nix

View 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"];
};
};
}