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

Add support to the Helix editor #10

Open
treeman opened this issue Mar 20, 2024 · 6 comments · May be fixed by helix-editor/helix#12562
Open

Add support to the Helix editor #10

treeman opened this issue Mar 20, 2024 · 6 comments · May be fixed by helix-editor/helix#12562

Comments

@treeman
Copy link
Owner

treeman commented Mar 20, 2024

  1. Add it to languages.toml: https://github.com/helix-editor/helix/blob/master/languages.toml
  2. Insert the queries here: https://github.com/helix-editor/helix/tree/master/runtime/queries
@StratusFearMe21
Copy link

StratusFearMe21 commented Apr 5, 2024

That would be amazing! You might have to have a separate directory for Helix queries though, since it seems that some of the nvim-treesitter queries aren't compatible with Helix, ex. @markup.strong is @markup.bold in Helix

@treeman
Copy link
Owner Author

treeman commented Apr 5, 2024

Yes, all the highlights needs to be reworked for the specific editor. The highlight files in this repo have been made with Neovim in mind because that's what I use, but should be seen as a starting point for porting it to other editors.

And even for Neovim they're a little bit different, as nvim-treesitter manages highlights.scm themselves, which is what everyone using Neovim will probably use (unless they create their own query file).

@mmibbetson
Copy link

mmibbetson commented Jan 16, 2025

I've been working on this since coming across this issue in the Helix repo the other day.

As I've said there, work is complete on the highlights and injections --- I'm just finishing up the languages.toml portion before I prepare a PR there.

I've noted that you're working on a pretty big rewrite, I'm happy to adapt the queries once djot and djot-inline are separated, but I figure it would still be nice for us to have current djot support in the meantime in Helix.

@mmibbetson mmibbetson linked a pull request Jan 16, 2025 that will close this issue
@mmibbetson
Copy link

mmibbetson commented Jan 17, 2025

If you're curious about what the highlights are looking like in Helix, I've provided some screenshots in this comment on the PR.

@treeman
Copy link
Owner Author

treeman commented Jan 28, 2025

I managed to rework the big rewrite to not be as breaking, although a few breaking changes were made. See #56 for (hopefully) a complete list of changes.

@mmibbetson
Copy link

Thanks for your hard work on the rewrite! It happened to coincide quite closely with Helix merging a change to have the same precedence as Neovim in its queries. I've inverted the order and everything should now be in a state that can be merged and will be easy to maintain over time since it's closer to the queries you maintain in this repo as well 😄

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 a pull request may close this issue.

3 participants