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

Suggestion - Split helix-grammars from helix package #45828

Closed
Zapeth opened this issue Aug 30, 2023 · 10 comments
Closed

Suggestion - Split helix-grammars from helix package #45828

Zapeth opened this issue Aug 30, 2023 · 10 comments

Comments

@Zapeth
Copy link
Contributor

Zapeth commented Aug 30, 2023

The helix package by default includes all its compiled treesitter grammars, which take up the majority of the package size (~110MB or 86% of the total size in the latest release, see also helix-editor/helix#6187).

While it is useful to have LSP support for all these languages out of the box, I think it should be up to the user to decide if its worth the extra space, especially since its likely to increase as more languages get added.

So my suggestion would be to split the grammar *.so at /usr/lib/helix/runtime/grammars in an extra package helix-grammars that depends on helix.

@classabbyamp
Copy link
Member

classabbyamp commented Aug 30, 2023

you could also noextract=/usr/lib/helix/runtime/grammars/*

@Zapeth
Copy link
Contributor Author

Zapeth commented Aug 30, 2023

Thanks, I wasn't aware of that option. That should also allow a custom selection of grammars that are relevant to the user, so I'll use that for the time being.

I still think a package separation would be more convenient, but if the consensus is that a user configuration is sufficient then feel free to close this issue.

@Bnyro
Copy link
Contributor

Bnyro commented Aug 30, 2023

I'd assume that most users expect Helix to support all the treesitters out of the box as described in the official Helix docs.

If this will be done, we should also add a note about it that shows up when installing the package, or instead make helix depend on helix-grammars, and not vice-versa as described above.

@triallax
Copy link
Contributor

I'd assume that most users expect Helix to support all the treesitters out of the box as described in the official Helix docs.

We could instead have helix-minimal, the core editor, and helix, which depends on both helix-minimal and helix-grammars.

@Bnyro
Copy link
Contributor

Bnyro commented Aug 31, 2023

Cc maintainer @tranzystorek-io

@tranzystorekk
Copy link
Contributor

I'd rather avoid making this package more complex than it needs to be, unless it achieves sth more than just size optimization.

@triallax
Copy link
Contributor

That's fine with me, but a vmove in a new subpackage isn't really that complicated, is it?

@classabbyamp
Copy link
Member

we don't need to subpackage everything

@triallax
Copy link
Contributor

Again, I don't object, I just disagree with the point that this is complicated.

@Zapeth
Copy link
Contributor Author

Zapeth commented Sep 1, 2023

Then I'll close this, noextract is a good enough workaround me.

@Zapeth Zapeth closed this as completed Sep 1, 2023
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

5 participants