Skip to content

Allow Sorbet + Ruby LSP to work together for Go To Definition. #2689

Open

Description

Description

Ruby LSP Information

Ruby LSP Information

VS Code Version

1.94.0

Ruby LSP Extension Version

0.8.2

Ruby LSP Server Version

0.19.1

Ruby LSP Addons

  • Ruby LSP Rails

Ruby Version

3.2.2

Ruby Version Manager

rbenv

Installed Extensions

Click to expand
  • better-comments (3.0.2)
  • vscode-theme-onedark (2.3.0)
  • Bookmarks (13.5.0)
  • auto-add-brackets (0.12.2)
  • vscode-mjml (1.6.0)
  • markdown-mermaid (1.25.0)
  • pgformatter (1.28.1)
  • vscode-navigate-edit-history (1.6.3)
  • vscode-eslint (3.0.10)
  • prettier-vscode (11.0.0)
  • auto-rename-tag (0.1.10)
  • vscode-pull-request-github (0.98.0)
  • go (0.42.1)
  • gc-excelviewer (4.2.62)
  • save-restore-editors (1.5.3)
  • plantuml (2.18.1)
  • copyfilename (1.0.0)
  • haml (1.4.1)
  • vscode-rdbg (0.2.2)
  • codeacejumper (3.3.2)
  • vscode-scss (0.10.0)
  • vscode-typescript-next (5.7.20241006)
  • vsliveshare (1.0.5941)
  • bun-vscode (0.0.15)
  • vscode-yaml-sort (6.5.17)
  • vscode-yaml (1.15.0)
  • block-travel (0.0.2)
  • ruby-extensions-pack (0.1.12)
  • ruby-lsp (0.8.2)
  • vscode-fileutils (3.10.3)
  • sorbet-vscode-extension (0.3.37)
  • cody-ai (1.36.3)
  • sass-indented (1.8.31)
  • vscode-open-in-github (1.18.0)
  • vscode-mermaid-editor (0.19.1)
  • gitblame (11.1.0)
  • vscode-todo-highlight (1.0.5)
  • vscode-markdown-everywhere (0.0.15)

Ruby LSP Settings

Click to expand
Workspace
{
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": false,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": false,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": false,
    "definition": false,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  },
  "rubyVersionManager": {
    "identifier": "rbenv"
  },
  "formatter": "none"
}
User
{
  "enableExperimentalFeatures": false,
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": false,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": false,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": false,
    "definition": false,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  },
  "featuresConfiguration": {},
  "addonSettings": {},
  "rubyVersionManager": {
    "identifier": "rbenv"
  },
  "customRubyCommand": "",
  "formatter": "none",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "/Users/amirsharif/.rbenv/shims/ruby",
  "indexing": {},
  "erbSupport": true
}

Reproduction steps

  1. Cmd+Hover over a Symbol.

Image

I thought that this extension will work with Sorbet. However, Sorbet's extension will not show hover information on an untyped file.
Despite that, it looks like RubyLSP still understands where the definition is.

Is there a way to get these two to play together?

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

Metadata

Assignees

Labels

bugSomething isn't workingvscodeThis pull request should be included in the VS Code extension's release notes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions