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

fix(nighly): use get_hl_from_capture for nightly, instead of hl_cache #432

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

Sam-programs
Copy link
Contributor

Seems to Fix #387

works.mp4

Stable works fine without this.


local hl = buf_query.hl_cache[capture]
local hl --- @type integer
if buf_query.get_hl_from_capture then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not always defined?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be undefined on older neovim versions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which versions? We only target the latest release.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not breaking older versions is nice, it can be refactored later. In my other plugins I usually try to have them working on whatever debian/ubuntu stable has, which is 0.7 at the moment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for a treesitter plugin. Even for Neovim core, treesitter is still considered experimental and the API's are moving quickly.

We can keep this as is, but just note going forward, backwards compatibility is a non-goal.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. I have lost access to my account @Sam-programs.

Which versions? We only target the latest release.

The function isn't defined in stable, tag latest in the releases page.

@lewis6991 lewis6991 merged commit ba4289a into nvim-treesitter:master Apr 19, 2024
2 checks passed
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.

Context has no highlighting when first opening Neovim
4 participants