Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch **/*.tf and **/*.tfvars files for the language server #1068

Closed
1 task
radeksimko opened this issue Apr 22, 2022 · 1 comment · Fixed by #1095
Closed
1 task

Watch **/*.tf and **/*.tfvars files for the language server #1068

radeksimko opened this issue Apr 22, 2022 · 1 comment · Fixed by #1095
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

radeksimko commented Apr 22, 2022

Complementary to hashicorp/terraform-ls#15


Background

The extension used to send updates about **/*.tf between v2.0.0 and v2.2.0
d6396b5#diff-04bba6a35cad1c794cbbe677678a51de13441b7a6ee8592b7b50be1f05c6f626L124
but for various reasons - esp. because the server wasn't ready - and still isn't - for handling these updates - it was removed.

Currently the extension doesn't send any updates about any files (except for the open files) to the server. The server may request globs to watch via relevant LSP capability, as described in hashicorp/terraform-ls#867

It would however make sense for the extension to just always send updates for the files that it generally claims to support, i.e. **/*.tf and **/*.tfvars.

https://github.com/microsoft/vscode-extension-samples/blob/2556c82cb333cf65d372bd01ac30c35ea1898a0e/lsp-sample/client/src/extension.ts#L42-L45

Proposal

  • Introduce watchers for the two globs (**/*.tf and **/*.tfvars) in
    const clientOptions: LanguageClientOptions = {
    documentSelector: documentSelector,
    initializationOptions: initializationOptions,
    initializationFailedHandler: (error) => {
    this.reporter.sendTelemetryException(error);
    return false;
    },
    outputChannel: this.outputChannel,
    revealOutputChannelOn: RevealOutputChannelOn.Never,
    };
@github-actions
Copy link

github-actions bot commented Jul 7, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant