Commit 3ed4bba
committed
fix: use higher-level API to get capture names
The recent breaking change of capture-based Treesitter highlight groups
[0] removed the `_get_hl_from_capture` method available on
`TSHighlighterQuery`. `get_captures_at_position` should be used instead.
The highlight group name is the capture name prefixed by the `@` symbol.
This fixes the plugin on Neovim nightly while preserving old
functionality on older versions when `get_captures_at_position` is not
available.
[0]: neovim/neovim#14090 (comment)1 parent 5e35a9f commit 3ed4bba
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
0 commit comments