Skip to content

fix(terraform-ls): return current buffer dir when missing .terraform#5103

Open
acalm wants to merge 1 commit intodense-analysis:masterfrom
acalm:acalm/terraform-ls-return-buffer-dir-as-project-dir-if-empty
Open

fix(terraform-ls): return current buffer dir when missing .terraform#5103
acalm wants to merge 1 commit intodense-analysis:masterfrom
acalm:acalm/terraform-ls-return-buffer-dir-as-project-dir-if-empty

Conversation

@acalm
Copy link

@acalm acalm commented Feb 27, 2026

while working in some larger repos, the .terraform dir might be missing for one reason or another, terraform-ls will fail to start and return:

Failed to find project root, language server won't start

check if tf_dir is empty, if so, just return the dir of the file in buffer.

while working in some larger repos, the .terraform dir might be missing
for one reason or another, terraform-ls will fail to start and return:
```
Failed to find project root, language server won't start
```
check if tf_dir is empty, if so, just return the dir of the file in
buffer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant