diff options
author | Riley Bruins <ribru17@hotmail.com> | 2024-09-19 13:08:22 -0700 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-10-11 18:15:07 +0200 |
commit | d3193afc2559e7d84ed2d76664a650dc03b4c6ef (patch) | |
tree | cfa3e37e11d158713ae01a691e03853509317e39 /runtime/lua/vim/_defaults.lua | |
parent | 267c7525f738cdd6024c39da758e885c026ffaaa (diff) | |
download | rneovim-d3193afc2559e7d84ed2d76664a650dc03b4c6ef.tar.gz rneovim-d3193afc2559e7d84ed2d76664a650dc03b4c6ef.tar.bz2 rneovim-d3193afc2559e7d84ed2d76664a650dc03b4c6ef.zip |
fix(treesitter): remove duplicate symbol names in language.inspect()
**Problems:**
- `vim.treesitter.language.inspect()` returns duplicate
symbol names, sometimes up to 6 of one kind in the case of `markdown`
- The list-like `symbols` table can have holes and is thus not even a
valid msgpack table anyway, mentioned in a test
**Solution:** Return symbols as a map, rather than a list, where field
names are the names of the symbol. The boolean value associated with the
field encodes whether or not the symbol is named.
Note that anonymous nodes are surrounded with double quotes (`"`) to
prevent potential collisions with named counterparts that have the same
identifier.
Diffstat (limited to 'runtime/lua/vim/_defaults.lua')
0 files changed, 0 insertions, 0 deletions