aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/fs_spec.lua
diff options
context:
space:
mode:
authorEmilia Simmons <emilia.milisims@gmail.com>2024-12-15 13:28:16 -0500
committerChristian Clason <ch.clason+github@icloud.com>2025-01-04 20:11:43 +0100
commit69aa33d890468c1024beef0d97d0f9424516c9ef (patch)
tree8545b43abbbd747f127308138d3cb777d9f0947e /test/functional/lua/fs_spec.lua
parent4eaf9371ca91445e5e49d4e943f74e7f746f7c6e (diff)
downloadrneovim-69aa33d890468c1024beef0d97d0f9424516c9ef.tar.gz
rneovim-69aa33d890468c1024beef0d97d0f9424516c9ef.tar.bz2
rneovim-69aa33d890468c1024beef0d97d0f9424516c9ef.zip
fix(runtime): let matchit and matchparen skips fallback on treesitter captures
When treesitter is enabled, by default syntax groups are not defined, but these groups are used to identify where to skip matches in matchit and matchparen. This patch does three things: 1. If syntax is enabled regardless of treesitter (`vim.bo.syntax='on'`): Use original implementation. 2. If treesitter is enabled and syntax is not: Match the syntax groups (i.e. `comment\|string`) against treesitter captures to check for skipped groups. 3. Add an explicit treesitter syntax for marking captures to skip: matchit uses `b:match_skip` to determine what counts as skippable Where 's:comment\|string' uses a match of the named syntax groups against a regex match of comment\|string, 't:comment\|string' now uses vim regex to match against the names of the treesitter capture groups.
Diffstat (limited to 'test/functional/lua/fs_spec.lua')
0 files changed, 0 insertions, 0 deletions