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
Syntax highlighting support for various languages (tree-sitter grammars list) #272
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Looking at how slowly a simple version change goes through in the upstream grammar repos, I wonder if we should temporarily use the forks instead. We aren't building to publish on crates.io so git dependencies should be just fine. We can track here which packages use the upstream versions and which ones use the forks. This would allow us to add support faster, as well as fix issues without being blocked on low traffic crates. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
The current swift grammar linked is abandoned. Update it with this one: https://github.com/alex-pinkus/tree-sitter-swift |
I've just made prs to a lot of these. Here you are! We're waiting on: |
@VixieTSQ for HCL updated repo is https://github.com/MichaHoffmann/tree-sitter-hcl |
@ghishadow |
you can copy from https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/hcl or https://github.com/helix-editor/helix/tree/master/runtime/queries/hcl I think with attribution. Looks like HTML syntax highlighting is also not working as HIGHLIGHTS_QUERY is commented in https://github.com/tree-sitter/tree-sitter-html/blob/master/bindings/rust/lib.rs#L38 |
#636 has been merged! go ahead and check those langs off, @Tiggilyboo |
I've done that :) |
Tree sitter Scala: https://github.com/tree-sitter/tree-sitter-scala |
Tree sitter hoon: https://github.com/urbit-pilled/tree-sitter-hoon |
Here is the Scala related PR #2280 not mentioned in the #272 (comment). It has been waiting for four months, so we'll need to resolve some minor conflicts and it's ready for another review probably then. |
We're not going to add any additional grammar to lapce for now until external grammar store is implemented. |
@panekj Thank you for the clarification. Is there a way to enable syntax highlighting locally, from within the editor, without adding it to |
Place to get additional grammars from, something like what plugins currently are except we can't distribute grammars through plugin store
There isn't any
No |
AT&T asm? |
Idem 👀 |
tree sitter nim: |
I would love to have AutoIt or AHK (v2) syntax highlighting if possible. I might have to have a look at tree-sitter. |
Assembler, NASM? |
Question: both Is there anything we need to do to get highlighting for such file types to work? XML file highlighting also isn't working, at least not "out of the box". C, C++ and yaml files do appear to have highlighting "out of the box". |
Highlighting changed due to dynamic grammar loading and some languages might be broken for now |
Got it. Thanks for clarifying. 👍 |
Maybe reset the checkmarks then, to avoid confusion? |
Highlighting for Markdown ( |
Highlighting for DOS/Windows batch ( |
Highlighting for Ruby ( |
Does this mean that we are able to externally load grammars now? I had written a TSG for Unison and was going to file a PR and that same week, it was announced that Lapce would not incorporate any more TSGs until an "external store" was available (unsure what that means, like a central Lapce-hosted repository of TSGs?), and so I bailed on Lapce as an IDE because it officially could not support my language. I stepped away from Lapce since fall of 2023 and decided to check back in. |
Yes, but adding new languages is not possible without modifying Lapce and building it |
Having looked through the majority of the issues, I would like to collectively address the state of the tree sitter language support currently in Lapce.
Here follows current support:
Add bash tree-sitter support #282add syntax highlighting support for Bash and Zig #690I would like to get a few more of these up and running, I'll see what others remain which are more low hanging fruit (Already on version 0.20 of tree-sitter and already expose the highlight query).
One other thing I would like to address is whether or not we wish to put a feature flag on these? Not sure how large all of these + build time impact this would have for lapce. Something to think about...
Cheers, I am really enjoying this editor!
The text was updated successfully, but these errors were encountered: