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

Do load inherited language queries resilient #6

Closed

Conversation

kaste
Copy link
Contributor

@kaste kaste commented Jan 29, 2024

The inherits pragma should not be handled strict.

The rather comprehensive queries library from nvim-treesitter doesn't use the pragma strict and wouldn't load if we don't follow their interpretation.

The `inherits` pragma should not be handled strict.

The rather comprehensive queries library from `nvim-treesitter` doesn't
use the pragma strict and wouldn't load if we don't follow their
interpretation.
@kaste
Copy link
Contributor Author

kaste commented Jan 29, 2024

I think we should expose a function that loads all queries for a language given a queries_path. If you look at nvim-treesitter they split their queries in multiple files per lang but load/concat all of them. (See: https://github.com/nvim-treesitter/nvim-treesitter#adding-queries "All queries found in the runtime directories will be combined.")

kylebebak pushed a commit that referenced this pull request Feb 4, 2024
@kylebebak
Copy link
Contributor

The inherits pragma should not be handled strict.

I agree with this. I just implemented what you suggested in this commit

I think we should expose a function that loads all queries for a language given a queries_path

@kaste Regarding this, I'm not sure I understand. queries_path is "Path to queries files for all languages". What would be the use of combining query files for different languages?

Do you want to open a separate issue to discuss it? I'm going to close this PR as done

@kylebebak kylebebak closed this Feb 4, 2024
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