Control: retitle -1 hx: Syntax highlighting requires building grammar plugins 
locally

Quoting Bastian Venthur (2025-03-10 10:41:22)
> I did indeed not read the README. Thanks for pointing that out, after
> running all the steps, it works as expected.

Good.

Now that that's out of the way, let's reuse this bugreport to track the
underlying issue of unusually needing to build grammar plugins locally.

> The problem is, that people will probably expect things like syntax
> highlighting and proper indent to work out of the box with a modern
> editor, as it does with similar packages like neovim, etc. Also, I
> feel that I have to update the grammar files every now and then, I'd
> rather have that happen automatically via package updates.
> 
> I'm not sure if 100+ MB of package data is really that much of an
> issue, but one could probably separate the grammar files into a
> separate package and make hx recommend it, so people can install hx
> without them if they really want. But before going through that
> hassle, I'd try to package them directly with hx first and see if
> people complain at all. People that install hx have probably different
> expectations about feature/package size ratio than vim-tiny users ;)

There are multiple concerns here:

# Sources for grammar plugins is not in Debian

Either hundreds of source packages need to be introduced to Debian, or
the src:hx package would need to carry hundreds of embedded projects.

I think the best approach is to package the sources for the more popular
grammars only, and think the best approach is that those interested in
some grammar join the tree-sitter team and file a bugreport against hx
when sources are available in Debian.

# Grammar plugins are either system-shared or personal

If I recall correctly (it is some time ago I looked into that), grammar
plugins can be stored below /usr - but if a single plugin exists below
~/.config/helix/runtime/grammars then the system-shared plugins are all
ignored.

Ideally we should convince upstream to improve this, but if not then I
am willing to carry a reasonably small patch for Debian. Help making
such patch is welcome.

# Grammar plugins slows startup of Helix

My main concern with many plugins is not size but speed: As I recall,
I experienced a noticable slowdown in startup of Helix when many plugins
are loaded.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/
 * Sponsorship: https://ko-fi.com/drjones

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to