diff options
author | Riley Bruins <ribru17@hotmail.com> | 2024-12-11 04:34:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-11 04:34:24 -0800 |
commit | 3dfb9e6f60d9ca27ff140a9300cc1a43e38aa2ee (patch) | |
tree | b789154529f853cd9cd0b5cb8c5d7f11b1bf286f /runtime/lua/vim/uri.lua | |
parent | 492ae57aa6f8973e939e9b0ade24c44b29fffcbe (diff) | |
download | rneovim-3dfb9e6f60d9ca27ff140a9300cc1a43e38aa2ee.tar.gz rneovim-3dfb9e6f60d9ca27ff140a9300cc1a43e38aa2ee.tar.bz2 rneovim-3dfb9e6f60d9ca27ff140a9300cc1a43e38aa2ee.zip |
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](https://github.com/neovim/neovim/commit/d63622930001b39b12f14112fc3abb55b760c447#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()`
Diffstat (limited to 'runtime/lua/vim/uri.lua')
0 files changed, 0 insertions, 0 deletions