Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ruby_lsp/setup_bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def stdout
# Gems that should be kept up to date in the composed bundle. When updating, any of these gems that are not
# already in the user's Gemfile will be updated together.
GEMS_TO_UPDATE = ["ruby-lsp", "debug", "prism", "rbs"].freeze #: Array[String]
RUBY_LSP_MIN_VERSION = "0.18.0" #: String

#: (String project_path, **untyped options) -> void
def initialize(project_path, **options)
Expand Down Expand Up @@ -170,9 +171,8 @@ def write_custom_gemfile
end

unless @dependencies["ruby-lsp"]
ruby_lsp_entry = +'gem "ruby-lsp"'
ruby_lsp_entry << ", \">= 0.a\"" if @beta
ruby_lsp_entry << ", require: false, group: :development"
version = @beta ? "0.a" : RUBY_LSP_MIN_VERSION
ruby_lsp_entry = +"gem \"ruby-lsp\", \">= #{version}\", require: false, group: :development"
ruby_lsp_entry << ", github: \"Shopify/ruby-lsp\", branch: \"#{@branch}\"" if @branch
parts << ruby_lsp_entry
end
Expand Down
Loading