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

More usage instructions in README #5

Open
hoijui opened this issue Jan 15, 2024 · 3 comments
Open

More usage instructions in README #5

hoijui opened this issue Jan 15, 2024 · 3 comments

Comments

@hoijui
Copy link

hoijui commented Jan 15, 2024

Woah cool! :-)
glad to see this, and even in Rust!
thank you!

I am mostly interested in the turtle support, but.. think I did not yet get it working well.
I would like to see instructions for that in the README too, and next to NVim, also for Helix - A quite well received Vim/Kakoune alternative written in Rust.

This is what I did to configure Helix, and .. I think it .. works, but am not sure:

~/.config/helix/languages.toml:

[language-server.turtle-lsp]
command = "turtle-language-server"

[[language]]
name = "turtle"
scope = "source.ttl"
injection-regex = "turtle"
file-types = ["ttl"]
comment-token = "#"
indent = { tab-width = 2, unit = "  " }
#formatter = { command = "mylang-formatter" , args = ["--stdin"] }
language-servers = [ "turtle-lsp" ]
@hoijui hoijui changed the title Usage instructions in README More usage instructions in README Jan 15, 2024
@ajuvercr
Copy link
Owner

I think command you are looking for is turtle-language-server.
Can you report back it that works?

@hoijui
Copy link
Author

hoijui commented Jan 17, 2024

That is what I used, as you can see in the second line in the config file.
Thing is.. it might work, but syntax highlighting does not work for sure, and that is what I use for validating visually, if it works or not.
... should that be working for turtle?

@ajuvercr
Copy link
Owner

I did some digging.

For me, it worked pretty easily with helix with this configuration inside ~/.config/helix/languages.toml

[language-server.turtle-lsp]
command = "turtle-language-server"

[[language]]
name = "turtle"
scope = "source.ttl"
injection-regex = "turtle"
file-types = ["ttl"]
comment-token = "#"
indent = { tab-width = 2, unit = "  " }
language-servers = [ "turtle-lsp" ]
roots = [] # note root

Result:
2024-01-18T11:34:00,184274897+01:00

The problem with highlighting is that the lsp uses semantic tokens to highlight the code (not treesitter), which is currently not yet implemented by helix.
helix-editor/helix#9360

But it does look like people are working on it.

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

No branches or pull requests

2 participants