Skip to content

treesitter-context does not refresh hoisted context when diagnostics/decorations change without text changes #668

Description

@alf171

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions