feat: add sorbet Ruby LSP server option#104
Merged
vitallium merged 2 commits intozed-extensions:mainfrom Jun 8, 2025
Merged
Conversation
notchairmk
commented
Jun 3, 2025
29b785b to
df6f7c2
Compare
df6f7c2 to
3bc38c1
Compare
Collaborator
|
@notchairmk Hi! I resolved the merge conflicts and copied the logic from the original extension, but I am not very familiar with |
Contributor
Author
|
@vitallium can confirm this looks good, works for me, and should be good to merge. Thank you! |
Collaborator
Fantastic! Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_argsbeing worktree-aware (and the extension being able to supply default args) the sorbet binary for a repo missing config atsorbet/configwill 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 } }