Skip to content

Conversation

@taylrfnt
Copy link

@taylrfnt taylrfnt commented Jan 6, 2026

this PR addresses some of the more modern nvim-treesitter rewrites, which break a lot of the common ts_utils and other utility calls.

the changes in the commit below remove the call to ts_utils and instead offset the coords from 0-indexed treesitter cords to 1-index vim coords.

I was able to test this successfully locally against treesitter's main branch and nvim v0.11.5.

This addresses #84

Hoping this helps anyone else who runs into a similar issue running the unstable treesitter rewrite :)

Copy link

@machshev machshev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@rhamilt
Copy link

rhamilt commented Jan 12, 2026

When I checkout your fork with these changes, I get an indexing error:

E5108: Error executing lua: ...e/nvim/lazy/codewindow.nvim/lua/codewindow/highlight.lua:110: attempt to index a nil value
stack traceback:
	...e/nvim/lazy/codewindow.nvim/lua/codewindow/highlight.lua:110: in function 'fn'
	...2/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:650: in function 'for_each_tree'
	...e/nvim/lazy/codewindow.nvim/lua/codewindow/highlight.lua:81: in function 'extract_highlighting'
	.../share/nvim/lazy/codewindow.nvim/lua/codewindow/text.lua:101: in function 'update_minimap'
	...local/share/nvim/lazy/codewindow.nvim/lua/codewindow.lua:25: in function 'open_minimap'
	...local/share/nvim/lazy/codewindow.nvim/lua/codewindow.lua:44: in function <...local/share/nvim/lazy/codewindow.nvim/lua/codewindow.lua:40>

This error occurs when toggling the codewindow on.

@taylrfnt
Copy link
Author

Hm, interesting. Can you share your neovim version, Treesitter version, and maybe the file that's the active buffer when you're attempting to toggle code window on?

I'd like to try and find a fix for this case if possible, but I've been unsuccessful in reproducing so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants