Skip to content

fix: fix treesitter get_parser for nvim v0.12#521

Open
zdm wants to merge 1 commit into
numToStr:masterfrom
neovim-plugins:fix/patch-treesitter
Open

fix: fix treesitter get_parser for nvim v0.12#521
zdm wants to merge 1 commit into
numToStr:masterfrom
neovim-plugins:fix/patch-treesitter

Conversation

@zdm

@zdm zdm commented Apr 13, 2026

Copy link
Copy Markdown

Under nvim 0.12 vim.treesitter.get_parser() call does not throws error. It just return null.
This PR fixes this problem.

@zdm zdm changed the title fix: fix treesitter get_parser fix: fix treesitter get_parser for nvim v0.12 Apr 13, 2026
@zdm

zdm commented Apr 13, 2026

Copy link
Copy Markdown
Author

Close: #517

@zdm

zdm commented Apr 14, 2026

Copy link
Copy Markdown
Author

@numToStr
Could you please merge this PR, it is critical for neovim 0.12.

@g0ng0

g0ng0 commented May 18, 2026

Copy link
Copy Markdown

For backward compatibility maybe we should use condition not ok or not parser instead?

@zdm

zdm commented May 18, 2026

Copy link
Copy Markdown
Author

We need to check if parser is present, not OK status.
Obviously, parser will be nil if it is not available.
So current condition is enough.

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