Skip to content

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

Merged
hsanson merged 1 commit intodense-analysis:masterfrom
acalm:acalm/terraform-ls-return-buffer-dir-as-project-dir-if-empty
Apr 11, 2026
Merged

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

Conversation

@acalm
Copy link
Copy Markdown
Contributor

@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.
@hsanson hsanson closed this Apr 11, 2026
@hsanson hsanson reopened this Apr 11, 2026
Copy link
Copy Markdown
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

@hsanson hsanson merged commit 051d12c into dense-analysis:master Apr 11, 2026
8 checks passed
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.

2 participants