Skip to content

Commit

Permalink
home (nvim): Configure OpenTofu support
Browse files Browse the repository at this point in the history
  • Loading branch information
britter committed Feb 11, 2025
1 parent b12a8d2 commit b5bd50b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions home/terminal/nvim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ in {
./lsp.nix
./navigation.nix
./ui.nix
./opentofu.nix
];

options.my.home.terminal.nvim = {
Expand Down
27 changes: 27 additions & 0 deletions home/terminal/nvim/opentofu.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
_: {
programs.nixvim = {
filetype.extension = {
tofu = "tofu";
};
plugins = {
lsp.servers.terraformls = {
enable = true;
filetypes = ["terraform" "tfvars" "tofu"];
};
treesitter = {
enable = true;
languageRegister = {
hcl = ["terraform" "tofu"];
};
};
none-ls.sources.formatting.opentofu_fmt = {
enable = true;
settings = {
extra_filetypes = [
"tofu"
];
};
};
};
};
}

0 comments on commit b5bd50b

Please sign in to comment.