Skip to content

refactor(ui)!: remove semantic token bridge - #551

Merged
esmuellert merged 1 commit into
mainfrom
refactor/remove-semantic-tokens
Sep 6, 2026
Merged

refactor(ui)!: remove semantic token bridge#551
esmuellert merged 1 commit into
mainfrom
refactor/remove-semantic-tokens

Conversation

@esmuellert

@esmuellert esmuellert commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove the manual LSP semantic-token bridge for virtual revision buffers
  • remove all virtual-buffer didOpen/didClose semantic-token traffic
  • keep Tree-sitter syntax highlighting for revision and conflict buffers
  • keep normal LSP behavior unchanged for real working-tree buffers
  • remove obsolete semantic-token tests, attribution, and development documentation

Motivation

The bridge required CodeDiff to emulate an LSP document lifecycle for codediff:// URIs. It caused duplicate didOpen, orphan didClose, stale asynchronous responses, unsupported URI errors, and server-specific failures in rust-analyzer, dartls, Astro LSP, marksman, and Terraform LSP.

The feature was automatic and had no reliable opt-out. Tree-sitter already provides stable syntax highlighting for virtual buffers, so removing the bridge eliminates this entire failure class and reduces maintenance.

Breaking change

Revision and conflict virtual buffers no longer receive LSP semantic-token highlighting. They use Tree-sitter syntax highlighting instead. Real working-tree buffers retain their normal LSP behavior.

BREAKING CHANGE: CodeDiff no longer requests or renders LSP semantic tokens in virtual revision or conflict buffers.

Closes #476
Closes #297
Closes #403

Issue #140 and #298 were already closed by #259. Issue #392 remains an independent path-handling architecture issue and is not closed by this PR.

Testing

  • CODEDIFF_TEST_JOBS=2 make test-lua — 106 spec files passed
  • stylua --check
  • git diff --check

Revision buffers now use Tree-sitter syntax highlighting only. Remove the manual LSP document lifecycle and semantic-token renderer to avoid unsupported codediff:// URIs and server lifecycle failures.

BREAKING CHANGE: CodeDiff no longer requests or renders LSP semantic tokens in virtual revision and conflict buffers. LSP behavior for real working-tree buffers is unchanged.
@esmuellert
esmuellert merged commit d23cc02 into main Sep 6, 2026
19 of 20 checks passed
@esmuellert
esmuellert deleted the refactor/remove-semantic-tokens branch September 6, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants