Skip to content

plugins/treesitter: support new api #4084

Merged
khaneliman merged 4 commits intonix-community:mainfrom
khaneliman:treesitter
Dec 19, 2025
Merged

plugins/treesitter: support new api #4084
khaneliman merged 4 commits intonix-community:mainfrom
khaneliman:treesitter

Conversation

@khaneliman
Copy link
Contributor

New treesitter branch will have a completely new API. update to support both legacy and new apis

Should add support for anyone using NixOS/nixpkgs#470883

@khaneliman khaneliman force-pushed the treesitter branch 2 times, most recently from 4c7d3f5 to e4a1f6e Compare December 15, 2025 21:58
Copy link
Member

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

I went through the diff and it seems great for starting the initial compat-implem. Good job!

@khaneliman khaneliman marked this pull request as ready for review December 16, 2025 03:33
Copy link
Member

@HeitorAugustoLN HeitorAugustoLN left a comment

Choose a reason for hiding this comment

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

LGTM

@khaneliman
Copy link
Contributor Author

@MattSturgeon Alright, just got back and applied those changes. Looks like warning and documentation looks right.

@khaneliman khaneliman force-pushed the treesitter branch 2 times, most recently from b68e9c6 to e594da2 Compare December 18, 2025 01:20
@HeitorAugustoLN
Copy link
Member

I've been using this branch for a few days now. Did the recent auto group thing break it?

Yeah, I also suspect is clear = true

@khaneliman
Copy link
Contributor Author

That wasn't intentional I meant to remove the module based one.

@HeitorAugustoLN
Copy link
Member

I think we can have clear = true, with one augroup, if folding, highlight and indent are set together.

@MattSturgeon
Copy link
Member

MattSturgeon commented Dec 18, 2025

I think we can have clear = true, with one augroup, if folding, highlight and indent are set together.

IIUC, the clear is done by nvim_create_augroup not nvim_create_autocmd, so you can still reuse the autoGroup even if it has clear = true, you just can't recreate it?

(I think)

@HeitorAugustoLN
Copy link
Member

I just noticed we are creating the same augroup two times, that is what is making it not work

@khaneliman
Copy link
Contributor Author

Yes, it was related a requested change above wanting them all to have a group. I meant to replace the module with the inline lua. It's just leftover code from a refactor.

@khaneliman khaneliman force-pushed the treesitter branch 5 times, most recently from 85511bb to 6307326 Compare December 18, 2025 14:11
Copy link
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

LGTM. Final questions, quibbles, suggestions:

@khaneliman khaneliman force-pushed the treesitter branch 2 times, most recently from aed6997 to 86807bd Compare December 18, 2025 15:51
@khaneliman
Copy link
Contributor Author

alright, updated with suggested changes and added that additional note

New treesitter branch will have a completely new API. update to support
both legacy and new apis
Just more consistent and intuitive.
Follow upstream recommendation for enabling folding.
Copy link
Member

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

I went through the diff again. No issue on my side.

@khaneliman khaneliman added this pull request to the merge queue Dec 19, 2025
Merged via the queue into nix-community:main with commit 6013b67 Dec 19, 2025
4 checks passed
@khaneliman khaneliman deleted the treesitter branch December 19, 2025 18:30
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.

4 participants