Skip to content

perf(lsp): replace dissimilar with imara-diff#32700

Merged
bartlomieju merged 1 commit intomainfrom
refactor/lsp-use-imara-diff
Mar 17, 2026
Merged

perf(lsp): replace dissimilar with imara-diff#32700
bartlomieju merged 1 commit intomainfrom
refactor/lsp-use-imara-diff

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

Summary

Addresses #30644 (comment)

  • Replaces dissimilar with imara-diff for computing LSP formatting text edits, unifying on a single diffing library across the codebase
  • Removes the dissimilar dependency entirely from the workspace
  • Diff granularity changes from character-level to line-level (standard for LSP implementations); edits are semantically equivalent

Test plan

  • Unit tests in cli/lsp/text.rs updated and passing
  • LSP integration tests updated to match line-level edit expectations
  • CI passes

🤖 Generated with Claude Code

Replace the `dissimilar` crate with `imara-diff` (already used in
`deno_resolver`) for computing LSP formatting text edits. This removes
a dependency from the project and unifies on a single diffing library.

The diff granularity changes from character-level to line-level, which
is the standard approach used by most LSP implementations. The edits
are semantically equivalent — applying them produces the same formatted
result.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bartlomieju bartlomieju changed the title refactor(lsp): replace dissimilar with imara-diff perf(lsp): replace dissimilar with imara-diff Mar 14, 2026
@bartlomieju bartlomieju requested a review from dsherret March 14, 2026 13:54
Copy link
Copy Markdown
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 832fbcf into main Mar 17, 2026
113 checks passed
@bartlomieju bartlomieju deleted the refactor/lsp-use-imara-diff branch March 17, 2026 15:13
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.

2 participants