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

Allow filtering fetched or built languages when using --grammar #6633

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kareigu
Copy link
Contributor

@kareigu kareigu commented Apr 6, 2023

Similar to having use-grammars in languages.toml, this PR implements allowing users the filter which grammars are fetched or built by passing a list of languages as a parameter to --grammar fetch or --grammar build.

If no list is provided all available grammars are fetched or built as is current behaviour as well.

Example output

hx --grammar build
Building 143 grammars

hx --grammar build rust cpp
Building 2 grammars

Rationale behind this feature is allowing users to only download the few grammars they might need, without having to mess around with configuration files.

One question arises however with how this should interact with the use-grammars field in languages.toml. With the current implementation settings configured in languages.toml are still honoured, but maybe it would make more sense for those settings to be overridden by the list supplied to the --grammar parameter?

helix-term/src/args.rs Outdated Show resolved Hide resolved
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 this pull request may close these issues.

2 participants