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

feat(lsp): add toml lsp #2302

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

axdank
Copy link
Contributor

@axdank axdank commented Apr 27, 2022

Add default lsp for toml

https://taplo.tamasfe.dev/

@sudormrfbin
Copy link
Member

Seems like it supports schemas which match against files like Cargo.toml, used for auto-completion, hover docs, etc. Maybe we can leverage it for helix's config.toml.

@@ -59,6 +59,7 @@ injection-regex = "toml"
file-types = ["toml"]
roots = []
comment-token = "#"
language-server = { command = "taplo", args = ["lsp", "stdio"] }
Copy link
Member

Choose a reason for hiding this comment

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

From the docs (here) it looks like this should be

Suggested change
language-server = { command = "taplo", args = ["lsp", "stdio"] }
language-server = { command = "taplo-lsp", args = ["run"] }

But maybe I'm just running an out of date binary locally? I'm running taplo-lsp 0.2.6 and maybe the most recent taplo has consolidated the LSP and CLI binaries?

Copy link
Contributor Author

@axdank axdank Apr 27, 2022

Choose a reason for hiding this comment

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

taplo-lsp can no longer be installed by itself, it can only be run from taplo lsp.
I think it was unified all in one.

https://taplo.tamasfe.dev/lsp/#native-binary
In this section it says install with cargo install taplo-lsp but throws an error.

image

I install taplo-cli and it runs with the simple taplo command. I attach a screenshot.

image

image

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, yeah looks like my package manager is behind on taplo versions. This looks good then 👍

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

Thanks!

@the-mikedavis the-mikedavis merged commit 2e46961 into helix-editor:master Apr 27, 2022
@axdank axdank deleted the toml_default_lsp branch July 21, 2022 14:22
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.

3 participants