From 3ce59f2e5b79e138277c7d1a224047cbf5178304 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 19 Feb 2026 12:34:20 +0200 Subject: [PATCH] fix(lsp): terraformls root path --- lua/crentist/lazy/lsp.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/crentist/lazy/lsp.lua b/lua/crentist/lazy/lsp.lua index 73e6595..1dc7450 100644 --- a/lua/crentist/lazy/lsp.lua +++ b/lua/crentist/lazy/lsp.lua @@ -85,7 +85,11 @@ return { }) vim.lsp.config('terraformls', { - filetypes = { 'terraform', 'terraform-vars', 'tf' } + filetypes = { 'terraform', 'terraform-vars' }, + -- run terraformls once for a git repo + root_dir = function(bufnr, on_dir) + on_dir(vim.fs.root(bufnr, '.git')) + end }) end }