Skip to content

Instantly share code, notes, and snippets.

@diegolinhares
Last active April 10, 2025 15:41
Show Gist options
  • Save diegolinhares/1abf8b7f123f8edf8b925ba38dbab174 to your computer and use it in GitHub Desktop.
Save diegolinhares/1abf8b7f123f8edf8b925ba38dbab174 to your computer and use it in GitHub Desktop.
RubyLSP
# Create this file in your home folder
# Example: /home/diego/ruby_lsp
source "https://rubygems.org"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-packaging"
gem "rubocop-rails"
gem "rubocop-rspec"
gem "rubocop-shopify"
gem "rubocop-thread_safety"
gem "ruby-lsp"
// For VSCode
{
"rubyLsp.bundleGemfile": "/home/your_user/ruby_lsp/Gemfile",
"rubyLsp.customRubyCommand": "asdf"
}
@diegolinhares
Copy link
Author

  • Install any Ruby version > 3 and define it as global using asdf: asdf global ruby 3.3.0
  • Create a ruby_lsp folder in your home or any name you want
  • Enter the folder and make a bundle install
  • Use the pwd command to get the path and paste in your settings.json on VSCode

You can see your settings on VSCode using CTRL/CMD + SHIFT + P > User Settings Json

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