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

Add setting for workspace root module configuration #423

Merged
merged 5 commits into from
Jul 14, 2020
Merged

Conversation

aeschright
Copy link
Contributor

Closes #396

@aeschright
Copy link
Contributor Author

Depends on hashicorp/terraform-ls#189

const reloadMsg = "Reload VSCode window to apply language server changes";
vscode.window.showInformationMessage(reloadMsg, "Reload").then((selected) => {
if (selected === "Reload") {
vscode.commands.executeCommand("workbench.action.reloadWindow");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this need to restart, why can't we just use the configuration RPC hook?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just read the LS issue, this is fine if its just the initial implementation and we can improve it over time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@radeksimko and I talked through it this morning, this is the simplest option to start with. We'll have to stagger the language server and extension releases to deploy this, so it makes the most sense to do something we know we can ship on the language server quickly.

Copy link
Member

Choose a reason for hiding this comment

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

The reload will still be necessary with the latest proposed solution (which involves initializationOptions), there's some context here to explain why:
hashicorp/terraform-ls#189 (comment)

package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
Co-authored-by: Paul Tyng <ptyng@hashicorp.com>
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
const reloadMsg = "Reload VSCode window to apply language server changes";
vscode.window.showInformationMessage(reloadMsg, "Reload").then((selected) => {
if (selected === "Reload") {
vscode.commands.executeCommand("workbench.action.reloadWindow");
Copy link
Member

Choose a reason for hiding this comment

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

The reload will still be necessary with the latest proposed solution (which involves initializationOptions), there's some context here to explain why:
hashicorp/terraform-ls#189 (comment)

Co-authored-by: Paul Tyng <ptyng@hashicorp.com>
@thejosephstevens
Copy link

Quick question, will this support wildcards? I have a directory of directories named "something.standard.suffix" and I'd love to just pick them all up with "terraform.rootModules" : "*.standard.suffix". I'd be up for trying to add this myself too if that's out of scope for this PR

@aeschright
Copy link
Contributor Author

Quick question, will this support wildcards? I have a directory of directories named "something.standard.suffix" and I'd love to just pick them all up with "terraform.rootModules" : "*.standard.suffix". I'd be up for trying to add this myself too if that's out of scope for this PR

Not on the first round, and we're still examining which parts of this should be handled by the extension and which by the language server. If you want to create an issue with your use case, that would be helpful!

@aeschright aeschright merged commit 698158f into master Jul 14, 2020
@aeschright aeschright deleted the root-config branch July 14, 2020 18:18
aeschright added a commit that referenced this pull request Jul 14, 2020
@ghost
Copy link

ghost commented Aug 13, 2020

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 context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to explicitly specify root modules as a workspace setting
4 participants