Commit f7e2ad7
[Backport release-0.7] fix(treesitter): create new parser if language is not the same as cached parser (neovim#18220)
* fix(treesitter): create new parser if language is not the same as cached parser
Fixes neovim#18148
(cherry picked from commit 8e35894)
* test: create new parser in vim.treesitter.get_parser() when filetype changes
(cherry picked from commit 30e7b3f)
Co-authored-by: Chinmay Dalal <[email protected]>1 parent 7f8faac commit f7e2ad7
File tree
2 files changed
+12
-1
lines changed- runtime/lua/vim
- test/functional/treesitter
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
70 | 81 | | |
71 | 82 | | |
0 commit comments