Skip to content

feat(ui) introducing an lsp menu dialog to fit more features than just codeactions - #2702

Open
gat0sy wants to merge 4 commits into
Acode-Foundation:mainfrom
gat0sy:feat/lsp-ui-integration
Open

feat(ui) introducing an lsp menu dialog to fit more features than just codeactions#2702
gat0sy wants to merge 4 commits into
Acode-Foundation:mainfrom
gat0sy:feat/lsp-ui-integration

Conversation

@gat0sy

@gat0sy gat0sy commented Aug 8, 2026

Copy link
Copy Markdown

Adds a dedicated LSP actions menu to the editor.

The tooltip button now opens the new LSP menu instead of directly showing code actions. Code actions have been moved into this menu alongside the other go-to actions.

The menu provides quick access to:

  • Go to Definition
  • Go to Declaration
  • Go to Implementation
  • Go to Type Definition
  • Find References
  • Rename Symbol
  • Code Actions

Single-result actions are executed directly without opening the menu.

This PR is based on PR #2701

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR introduces a consolidated LSP actions menu and expands editor navigation, reference, rename, code-action, tooltip-link, and workspace-edit support.

  • Aggregates capabilities across attached language-server clients when constructing the actions menu.
  • Routes go-to operations to a client advertising the requested capability.
  • Preserves multiple workspace-edit groups targeting the same URI by accumulating their edits.
  • Adds shared LSP position and text-edit utilities.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains from the previously reported issues.

The menu now aggregates capabilities across attached clients and go-to operations select a supporting client, while workspace edits accumulate duplicate URI groups rather than overwriting earlier groups; no blocking failure remains.

Important Files Changed

Filename Overview
src/lib/selectionMenu.js Builds the LSP menu from capabilities merged across all attached clients, resolving the previously reported single-client discovery issue.
src/cm/lsp/definition.ts Implements go-to requests by selecting a client that advertises the requested definition capability.
src/cm/lsp/transport.ts Adds workspace/applyEdit handling and retains all edit groups that target the same URI, resolving the previously reported overwrite behavior.
src/cm/lsp/textEditUtils.ts Centralizes LSP-position conversion and CodeMirror text-edit application.
src/cm/lsp/tooltipExtensions.ts Adds navigation for file links rendered in hover and signature documentation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Button[LSP actions button] --> Menu[LSP actions menu]
  Menu --> Capability[Select supporting LSP client]
  Capability --> Navigation[Definitions and references]
  Capability --> Rename[Rename symbol]
  Capability --> Actions[Code actions]
  Actions --> WorkspaceEdit[Apply workspace edits]
Loading

Reviews (2): Last reviewed commit: "feat(editor): resolve LSP file:// URIs a..." | Re-trigger Greptile

Comment thread src/lib/selectionMenu.js Outdated
Comment thread src/cm/lsp/transport.ts Outdated
gat0sy added 4 commits August 10, 2026 03:38
LspToPosition threw range error on format error.
We attempt to fix it here with by clamping so we get the correct line count between the client and server.

applyTextEdit as also been extracted so both transport and client manager can import it from the helper.
LspToPosition threw range error on format error.
We attempt to fix it here with by clamping so we get the correct line count between the client and server.

applyTextEdit as also been extracted so both transport and client manager can import it from the helper.
go to def and similar fonction have been added,
a new interceptFileLink method has been created to solve an FileUriExposedException you may get if taping the signature link on the hover.

if the link is a website, it skips and let the normal behavior occur ( open a web browser page )
if the link is a file, it modifies the uri so the tap behave like a go to instead of crashing the whole app.
There are notably also some fixes for code actions, rename...ect, now they use the new lspPostionToOffset that uses clamping
…actions menu

Added resolveContentUriForFileUri() to map LSP file:// responses back to
content:// and sftp:// URIs via addedFolder matching

Refactor editorManager displayFile/openFile to resolve URIs before
opening, enabling cross-workspace go-to-definition and references

Added SFTP path-aware root URI resolution for remote workspace context

Replace selection menu code-actions button with full LSP actions menu
(definition, declaration, implementation, type-definition, references,
rename, code-actions) with single-item auto-execution
@gat0sy
gat0sy force-pushed the feat/lsp-ui-integration branch from 2b6f880 to 32b9957 Compare August 10, 2026 05:19
@bajrangCoder

This comment was marked as outdated.

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

Labels

enhancement New feature or request

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants