-
-
Notifications
You must be signed in to change notification settings - Fork 895
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
Lsp Terraform #1147
Lsp Terraform #1147
Conversation
This is rough, untested, and might not work at this point. Just bones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I accidentally clicked merge instead of posting the review but you may apply the comments afterwards:
Can you update the readme accordingly?
Also true: I cannot find a good way to auto-install terraform-lsp.
Have you checked what vscode plugin does? A rule of thump is that if vscode does not have automatically installed we cannot do it too(e. g. clangd)?
As a side note, in dap-mode project we have facilities to automatically download and extract vscode extensions. We should move them here in lsp-mode and use it for automatic installation when possible.
I don't know if there's a typical or correct mechanism for reporting missing language servers, or if it's built in!
What do you mean by "missing"?
|
||
(defun lsp-terraform--make-launch-cmd () | ||
(-let [base `(,lsp-terraform-server)] | ||
(if lsp-terraform-enable-logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use when
when there is one leg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, happy to. Wanted to leave a clear place for more configurations in the future, but this total makes sense to me for now 👍
If you are familiar with docker it will be great if you can add your server to lsp-docker image and add sample project to test with. It will be useful for both lsp developers(when fixing bugs) and for users(when someone wants to evaluate a server). |
@yyoncho I'm quite familiar with docker, as it happens; I don't have a good sample project around, but I'll try and knock one together soon. I'll open an issue for this, so it doesn't get lost. Very happy to get that taken care of pretty soon here 👍 As for the rest of your feedback:
|
Ahhh, shoot -- the |
@yyoncho do we have an existing pattern for how to compute and download platform-specific versions? That is: terraform-lsp doesn't appear to publish a "newest" artefact, a la fsautocomplete; instead it's building platform-specific binaries with version numbers. VS Code is handling this using a Github library called Octokit; do we have any equivalent tooling that I'm just not finding, or should I write something for us? (All the info we need is available from the Github API, it'll just take a bit of parsing.) |
No, we don't - we expect the user to check the info in the README. IMO it makes sense to have it at least for most popular language servers.
Something similar to what FSharp and MS Pyls do? I will move the rest of the discussion in #506 . |
Ah, at least for F# and In any case, it sounds like a broader solution is needed, so for now, I'm going to document up the steps to manually install the terraform server and leave it at that until #506 is resolved. |
ms python seems to be platform-dependent: https://github.com/emacs-lsp/lsp-python-ms/blob/master/lsp-python-ms.el#L152 |
@Gastove I added vendor folder, and tested against go 1.10/1.11 , 1.9 doesn't work due to one of the deps uses strings.Builder which is 1.10+ only P.S. I am working on adding more features and fixing any existing issues with it |
This PR brings in
lsp
configs for working with Terraform configuration files. This configuration is backed by terraform-lsp.terraform-lsp
is... fairly limited. I've been using this at my day job, and it's still helpful, but it's nowhere near as fully featured as, say,gopls
orrls
.Also true: I cannot find a good way to auto-install
terraform-lsp
. It requires a fully-functionalgo
install toolchain (a modern one, usinggo mod
, meaning go version 1.11 or greater). I don't know if there's a typical or correct mechanism for reporting missing language servers, or if it's built in! Do let me know?Closes #878.