nvim-treesitter / nvim-treesitter/nvim-treesitter-context
treesitter-context does not refresh hoisted context when diagnostics/decorations change without text changes
Nobody has claimed this yet.
- Dominant language
- Janet
- Stars
- 3.2k
- Forks
- 241
- PR merge metrics
- No merged PRs in 30d
Description
Summary
nvim-treesitter-context appears to cache/render hoisted context lines based only on text changes. However, if the underlying line doesn't change but its diagnostic or other decorations do, the hoisted context can become stale and keep this information.
Current behavior
diagnostics can become stale on hoisted context causing confusion
Expected behavior:
- hoisted context should refresh when diagnostics or other relevant decorations for the source line change even if the line remains unchained
Steps to Reproduce
local x = function() <-- shows diagnostic function not used
... <cursor here>
end
- then add x() after end
- go back to where cursor was and notice local x = function is still pinned but it the diagnostic hasn't been removed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file or test. Reproduce the stale diagnostic in a hoisted context, then trace the refresh path for context lines when diagnostics or decorations change without text changes. Done means the hoisted line updates after the diagnostic is removed while its source text remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neovim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100