diff options
author | Riley Bruins <ribru17@hotmail.com> | 2024-07-28 13:42:18 -0700 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-07-29 17:15:46 +0200 |
commit | 94d42a3e7239a4035ee4429cbd71d5b0162b8289 (patch) | |
tree | 081962345d37dbacb902814cd09f12f1fa4e96c7 /runtime/lua/vim/treesitter/dev.lua | |
parent | 1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654 (diff) | |
download | rneovim-94d42a3e7239a4035ee4429cbd71d5b0162b8289.tar.gz rneovim-94d42a3e7239a4035ee4429cbd71d5b0162b8289.tar.bz2 rneovim-94d42a3e7239a4035ee4429cbd71d5b0162b8289.zip |
fix(treesitter): highlight anonymous nodes in inspect_tree
**Problem:** With anonymous nodes toggled in the inspect tree, only
named nodes will be highlighted when moving the cursor in the source
code buffer.
**Solution:** Retrieve the anonymous node at the cursor (when toggled on
in the inspect tree) and highlight them when appropriate, for better
clarity/specificity.
Diffstat (limited to 'runtime/lua/vim/treesitter/dev.lua')
-rw-r--r-- | runtime/lua/vim/treesitter/dev.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/treesitter/dev.lua b/runtime/lua/vim/treesitter/dev.lua index bd0ef5a011..e89aea2b85 100644 --- a/runtime/lua/vim/treesitter/dev.lua +++ b/runtime/lua/vim/treesitter/dev.lua @@ -183,6 +183,7 @@ local function set_inspector_cursor(treeview, lang, source_buf, inspect_buf, ins lang = lang, pos = pos, ignore_injections = false, + include_anonymous = treeview.opts.anon, }) if not cursor_node then return |