-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instructions for Sublime Text LSP #962
Conversation
I have signed the CLA! |
EDITORS.md
Outdated
|
||
## Sublime Text LSP | ||
|
||
[LSP for Sublime Text](https://github.com/sublimelsp/LSP) has built-in support for [Solargraph](https://lsp.sublimetext.io/language_servers/#solargraph) and [Sorbet](https://lsp.sublimetext.io/language_servers/#sorbet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Would it be feasible to open on a PR sublimelsp
to add built-in support for Ruby LSP, rather than having people manually configure it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the idea, would make things easier - I think the wording might have been a bit misleading here I admit. The Sublime Text LSP documentation already includes instructions for solargraph & sorbet, but people still need to configure those manually as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
EDITORS.md
Outdated
"command": [ | ||
"ruby-lsp" | ||
], | ||
"selector": "source.ruby | text.html.ruby | text.html.erb | text.html.rails", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support any file extensions other than Ruby yet. For example, we haven't worked on adding erb
support.
So I think we can limit the selector to .rb
Ruby files only for now.
EDITORS.md
Outdated
], | ||
"selector": "source.ruby | text.html.ruby | text.html.erb | text.html.rails", | ||
"initializationOptions": { | ||
"diagnostics": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"diagnostics": false | |
{ | |
"enabledFeatures": { | |
"diagnostics": false | |
}, | |
"experimentalFeaturesEnabled": true | |
} |
Thank you for the feedback @andyw8 and @vinistock. I addressed your comments in the latest commit 964ada9. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment, but this looks great. Thank you for putting it together!
Co-authored-by: Vinicius Stock <vinistock@users.noreply.github.com>
* Add instructions for Sublime Text LSP * Update Sublime Text LSP instructions * Update EDITORS.md Co-authored-by: Vinicius Stock <vinistock@users.noreply.github.com> --------- Co-authored-by: Vinicius Stock <vinistock@users.noreply.github.com>
How do I get the list of features? How do I disable them? For example, to disable rubocop. |
You can see the full list here: ruby-lsp/lib/ruby_lsp/server.rb Lines 143 to 154 in b027cfa
|
Motivation
I think it would be great to expand the existing documentation to include
ruby-lsp
configuration for Sublime Text. This would make it easier for Sublime Text users to enjoy the benefits ofruby-lsp
.Implementation
The documented Sublime Text LSP configiguration is based on the official documentation for configuring solargraph
Automated Tests
Not applicable because this is a change affecting documentation only.
Manual Tests
(1) shows the LSP configuration
(2) shows that
ruby-lsp
is picked up correctly(3) shows a rubocop offense