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

Improve LSP support #1356

Open
wata727 opened this issue Apr 16, 2022 · 1 comment
Open

Improve LSP support #1356

wata727 opened this issue Apr 16, 2022 · 1 comment
Labels
enhancement needs-design Detailed design is required for implementation

Comments

@wata727
Copy link
Member

wata727 commented Apr 16, 2022

The experience in the editor is important. Users want to get feedback in the editor in real-time than detected by CI after pushing to the branch. TFLint has provided an experimental language server, but I think it's not enough yet.

The LSP support has the following issues:

  • There are no out-of-the-box extensions. You need an installable package like vscode-terraform.
  • The language server cannot analyze repositories that have multiple workspaces correctly.
  • The language server performance has not been tested.

For the first issue, you can either publish a new package or consider how to embed it into vscode-terraform. However, there are many things to consider because TFLint's language server is not able to used in vscode-terraform. I'm thinking of starting by publishing my own package.

The second issue will be solved by fixing #1355. When rewriting the module loader, it is necessary to design not only a linter but also a language server.

The last issue is important when considering deep checking, such as in the AWS ruleset. I haven't really seen how the current language server works for deep checking, but the experience is probably terrible. A language server that is slow to respond will make the development experience worse. The lifecycle of a language server is long enough, unlike a linter, so you can use the cache more aggressively. It may be possible to parallelize the inspections using goroutine.

In addition to these issues, the language server may be able to provide great functionality. For example, the AWS ruleset has enum candidates that you might use as a response to a completion request. In this way, I believe that improving LSP support can make a contribution to improving the developer experience.

@wata727 wata727 added needs-design Detailed design is required for implementation enhancement labels Dec 28, 2022
@kim0
Copy link

kim0 commented May 8, 2023

It is not clear to me how to use the language server after starting it. How do I tell vscode to use it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs-design Detailed design is required for implementation
Development

No branches or pull requests

2 participants