Files
neovim/runtime/doc
Riley Bruins 1d5b3b5b4c 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.
2025-06-13 06:42:10 -07:00
..
2023-07-25 05:07:13 -07:00
2025-01-01 12:29:51 -08:00
2025-05-03 10:08:53 -07:00
2024-05-15 23:19:26 +02:00
2025-04-27 15:44:11 -07:00
2025-06-07 07:49:04 -07:00
2025-05-03 10:08:53 -07:00
2023-06-25 17:14:28 +02:00
2025-06-10 23:00:38 +08:00
2025-05-03 10:08:53 -07:00
2025-05-17 10:59:14 +02:00
2025-05-03 10:08:53 -07:00
2022-10-14 08:01:13 -07:00
2025-03-30 13:29:36 -07:00
2025-06-01 14:13:50 -07:00
2024-11-21 06:50:30 +08:00
2025-05-03 15:47:59 -07:00
2024-01-18 00:14:48 -08:00
2025-03-02 14:27:52 -08:00
2023-01-01 15:05:13 +01:00
2025-03-15 15:00:44 +01:00
2025-04-27 13:40:46 -07:00
2025-02-15 14:55:25 +01:00
2025-05-03 15:47:59 -07:00
2025-03-18 06:18:37 -07:00
2023-08-10 17:28:02 +08:00
2025-01-03 08:29:36 -08:00
2024-04-23 08:20:36 +08:00
2024-05-11 18:14:03 +08:00
2023-04-23 15:22:55 +02:00
2023-01-03 10:07:43 +00:00
2023-06-25 17:14:28 +02:00
2023-06-25 17:14:28 +02:00
2021-05-01 22:29:03 -04:00
2018-10-29 10:01:44 +01:00
2021-04-29 09:27:19 -04:00
2023-06-25 17:14:28 +02:00
2021-04-29 20:42:16 -04:00
2023-06-26 11:29:12 +02:00
2023-07-25 05:07:13 -07:00
2021-04-27 09:21:34 -04:00
2023-06-19 08:40:33 -07:00
2025-05-03 15:47:59 -07:00
2025-06-08 09:59:02 +08:00
2025-03-18 06:18:37 -07:00