neovim/test/functional/treesitter
Riley Bruins 3dfb9e6f60
feat(treesitter): include capture id in return value of get_captures_at_pos() #30559
**Problem:** Currently, it is difficult to get node(s)-level metadata
for a capture returned by `get_captures_at_pos()`. This is because it is
stored in `metadata[id]` and we do not have access to the value of `id`,
so to get this value we have to iterate over the keys of `metadata`. See
[this commit](d636229300 (diff-8bd4742121c2f359d0345f3c6c253a58220f1a28670cc4e1c957992232059a6cR16)).

Things would be much simpler if we were given the `id` of the capture so
we could use it to just index `metadata` directly.

**Solution:** Include `id` in the data returned by
`get_captures_at_pos()`
2024-12-11 04:34:24 -08:00
..
fold_spec.lua fix(tests): needing two calls to setup a screen is cringe 2024-11-14 12:40:57 +01:00
highlight_spec.lua feat(treesitter): include capture id in return value of get_captures_at_pos() #30559 2024-12-11 04:34:24 -08:00
inspect_tree_spec.lua test: support upvalues in exec_lua 2024-09-21 16:04:09 +01:00
language_spec.lua fix(treesitter): mark supertype nodes as named 2024-10-12 09:59:44 +02:00
node_spec.lua feat(treesitter): introduce child_with_descendant() 2024-10-11 17:29:45 +02:00
parser_spec.lua fix(treesitter): #trim! range for nodes ending at col 0 #31488 2024-12-07 03:01:59 -08:00
query_spec.lua fix(treesitter): show proper node name error messages 2024-11-13 13:32:58 +01:00
testutil.lua test(treesitter): add a simple testutil file 2024-12-06 08:36:28 -08:00
utils_spec.lua perf(treesitter): use child_containing_descendant() in is_ancestor() 2024-09-25 23:01:08 +02:00