Skip to content

fix(lsp): refresh current document colors - #151

Open
khaneliman wants to merge 1 commit into
uga-rosa:mainfrom
khaneliman:fix/lsp-color-response-order
Open

khaneliman wants to merge 1 commit into
uga-rosa:mainfrom
khaneliman:fix/lsp-color-response-order

Conversation

@khaneliman

@khaneliman khaneliman commented Sep 2, 2026 •

Copy link
Copy Markdown

Summary

Refresh CCC highlights after the current LSP document-color response completes.

Why

Accepted responses update the color cache without redrawing existing extmarks. An older asynchronous response can also overwrite newer color data.

What changed

  • Reject responses for changed buffers or superseded requests.
  • Redraw attached buffers after accepting the current response.
  • Preserve deferred updates in insert mode when highlighter.update_insert is disabled.
  • Clear per-buffer request state on detach.
  • Add focused coverage for response ordering and redraw behavior.

Testing

  • Eight focused LSP tests on Neovim 0.12.5 and nightly
  • Full suite, 134/134 on Neovim 0.12.5
  • StyLua and focused Luacheck

The nightly full suite retains 28 existing failures in unchanged test/command_spec.lua.

Related Issue(s)

Discard stale document-color responses, preserve deferred insert-mode updates, and redraw attached buffers after accepting current results.
@khaneliman
khaneliman force-pushed the fix/lsp-color-response-order branch from 725da39 to 08259ec Compare September 2, 2026 05:00
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.

1 participant