diff options
| author | Riley Bruins <ribru17@hotmail.com> | 2025-06-13 06:42:10 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-13 06:42:10 -0700 |
| commit | 1d5b3b5b4c862524c9d910e36afc8df56492ec9d (patch) | |
| tree | 5e8d13e2a8aef5bfa90c9c7f23f6e57ae847cc1d /runtime/lua/vim/_extui/shared.lua | |
| parent | 9ec6c19c674f959765956b54c8f5ef9a43c07e12 (diff) | |
| download | rneovim-1d5b3b5b4c862524c9d910e36afc8df56492ec9d.tar.gz rneovim-1d5b3b5b4c862524c9d910e36afc8df56492ec9d.tar.bz2 rneovim-1d5b3b5b4c862524c9d910e36afc8df56492ec9d.zip | |
feat(treesitter)!: apply `offset!` directive to all captures #34383
This commit changes the `offset!` directive so that instead of setting a
`metadata.range` value for the entire pattern, it will set a
`metadata.offset` value. This offset will be applied to the range only
in `vim.treesitter.get_range()`, rather than at directive application
time. This allows the offset to be applied to any and all nodes captured
by the given pattern, and removes the requirement that `#offset!` be
applied to only a single node.
The downside of this change is that plugins which read from
`metadata.range` may be thrown off course, but such plugins should
prefer `vim.treesitter.get_range()` when retrieving ranges anyway.
Note that `#trim!` still sets `metadata.range`, and
`vim.treesitter.get_range()` still reads from `metadata.range`, if it
exists.
Diffstat (limited to 'runtime/lua/vim/_extui/shared.lua')
0 files changed, 0 insertions, 0 deletions