Skip to content

feat: add sorbet Ruby LSP server option#104

Merged
vitallium merged 2 commits intozed-extensions:mainfrom
notchairmk:notchairmk/add-sorbet
Jun 8, 2025
Merged

feat: add sorbet Ruby LSP server option#104
vitallium merged 2 commits intozed-extensions:mainfrom
notchairmk:notchairmk/add-sorbet

Conversation

@notchairmk
Copy link
Contributor

Redo for #9 (unable to reopen after force-pushing to the branch for the original PR).

This adds Sorbet's LSP as an additional Ruby language server option and would take precedent over https://github.com/notchairmk/zed-sorbet.

In it's current state issues like notchairmk/zed-sorbet#6 will still be present. In addition, without get_executable_args being worktree-aware (and the extension being able to supply default args) the sorbet binary for a repo missing config at sorbet/config will fail to initiate. The workaround in zed-sorbet was to just supply empty config if that file is missing and allow for file-local errors.

These are the listed server capabilities

{
  "textDocumentSync": 1,
  "hoverProvider": true,
  "completionProvider": {
    "triggerCharacters": [
      ".",
      ":",
      "@",
      "#"
    ]
  },
  "definitionProvider": true,
  "typeDefinitionProvider": true,
  "implementationProvider": true,
  "referencesProvider": true,
  "documentHighlightProvider": true,
  "documentSymbolProvider": true,
  "workspaceSymbolProvider": true,
  "codeActionProvider": {
    "codeActionKinds": [
      "quickfix",
      "source.fixAll.sorbet",
      "refactor.extract",
      "refactor.rewrite"
    ],
    "resolveProvider": true
  },
  "documentFormattingProvider": false,
  "renameProvider": {
    "prepareProvider": true
  }
}
image

@cla-bot cla-bot bot added the cla-signed label Jun 3, 2025
@notchairmk notchairmk force-pushed the notchairmk/add-sorbet branch from 29b785b to df6f7c2 Compare June 3, 2025 16:40
@vitallium vitallium force-pushed the notchairmk/add-sorbet branch from df6f7c2 to 3bc38c1 Compare June 7, 2025 18:33
@vitallium
Copy link
Collaborator

@notchairmk Hi! I resolved the merge conflicts and copied the logic from the original extension, but I am not very familiar with sorbet. Could you please check the updates to this PR and let me know if we are ready to merge it? Thanks!

@notchairmk
Copy link
Contributor Author

@vitallium can confirm this looks good, works for me, and should be good to merge. Thank you!

@vitallium
Copy link
Collaborator

@vitallium can confirm this looks good, works for me, and should be good to merge. Thank you!

Fantastic! Thank you!

@vitallium vitallium merged commit 8587f26 into zed-extensions:main Jun 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants