Skip to content

Add editor plugin API with LSP support - #17

Merged
Pante merged 15 commits into
mainfrom
feature/editor-plugin-api
Oct 10, 2026
Merged

Pante merged 15 commits into
mainfrom
feature/editor-plugin-api

Conversation

@Pante

@Pante Pante commented Oct 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Editor API in packages/plugin (editor.ts, theme.ts) so plugins can contribute to the code editor
  • Language server support: hovers, completions, signature help, rename, find usages, go to definition, formatting (whole file or selection), usage highlights at the caret, problems and context actions (Alt-Enter, Shift-Alt-Enter for the top quick fix), LSP context menu items, link recognition and server error messages
  • Example plugins: plugins/examples/editor (color picker) and plugins/examples/language-server
  • Fix // and /// rendering; drop italic comments because of a Chromium font rendering bug

Test plan

  • Run the desktop app with the example language server plugin and try hover, completion, rename, find usages, formatting and context actions
  • Run the editor example plugin
  • Unit and screenshot tests pass

🤖 Generated with Claude Code

Pante and others added 15 commits October 8, 2026 15:58
…nition, and displaying LSP error messages
…ion formatting

- Context menu: Find usages, Go to definition and Rename, shown when the server supports them
- Highlight the usages of the name at the caret, behind the `highlightUsages` setting
- Hovers open only on hover while usages are highlighted, not on a click
- Format only the selection when there is one, on Mod-Alt-L
- Move `symbol` and `hint` into the code editor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Context actions on Alt-Enter: the server's quick fixes, then its other actions, in a popup at the cursor
- Apply the top quick fix on Shift-Alt-Enter
- "Show context actions" leads the context menu when the server has code actions
- A problem's hover names its top fix and "More actions", and waits for them, along with the documentation, so nothing shifts
- One `serverDiagnostics` extension for pushed and pulled problems, keeping the server's originals in `problems`
- Keep an underline that a plain problem shares with an unnecessary one
- Render code quoted in backticks in action titles as code
- Draw link underlines through descenders in hovers
- Add a `completionHovered` theme color
- Move `hint` and `appendCode` into `tooltip.ts`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Pante
Pante merged commit c2b11ec into main Oct 10, 2026
13 checks passed
@Pante
Pante deleted the feature/editor-plugin-api branch October 10, 2026 02:31
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