diff --git a/home/editors/helix/default.nix b/home/editors/helix/default.nix index 68ca97a..ffb18dc 100644 --- a/home/editors/helix/default.nix +++ b/home/editors/helix/default.nix @@ -80,6 +80,22 @@ in "buf-lint" ]; } + { + name = "hcl"; + language-id = "opentofu"; + language-servers = [ "opentofu-ls" ]; + injection-regex = "(hcl|tf|tofu)"; + file-types = [ + "hcl" + "tf" + "tofu" + ]; + } + { + name = "tfvars"; + language-id = "opentofu-vars"; + language-servers = [ "opentofu-ls" ]; + } { name = "graphql"; formatter = prettier "graphql"; @@ -211,6 +227,13 @@ in }; }; }; + opentofu-ls = { + command = "opentofu-ls"; + args = [ "serve" ]; + config = { + opentofu.path = "tofu"; + }; + }; }; settings = { theme = "dark_plus"; diff --git a/home/editors/lsp.nix b/home/editors/lsp.nix index 541afb3..5b7781e 100644 --- a/home/editors/lsp.nix +++ b/home/editors/lsp.nix @@ -8,6 +8,7 @@ unstable.nixd nls terraform-ls + unstable.opentofu-ls pyright nodePackages.bash-language-server nodePackages.vim-language-server