diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 321e3b2e3..b185a2d16 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,13 +1,14 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. - // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp - // List of extensions which should be recommended for users of this workspace. - "recommendations": [ - "Shopify.ruby-extensions-pack" - ], - // List of extensions recommended by VS Code that should not be recommended for users of this workspace. - "unwantedRecommendations": [ + // List of extensions which should be recommended for users of this workspace. + "recommendations": [ + "Shopify.ruby-extensions-pack", + "Shopify.ruby-lsp" + ], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [ - ] + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index c3c9bd92e..45572d846 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,7 +10,7 @@ "byesig.fold": false, "byesig.showIcon": false, "[ruby]": { - "editor.defaultFormatter": "Shopify.rubocop-lsp", + "editor.defaultFormatter": "Shopify.ruby-lsp", "editor.formatOnSave": true } } diff --git a/Gemfile b/Gemfile index 88232238c..0b6f6f673 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,7 @@ gem("rubocop-shopify", require: false) gem("rubocop-sorbet", ">= 0.4.1") gem("rubocop-rspec", require: false) gem("sorbet") +gem("ruby-lsp", require: false) group(:deployment, :development) do gem("rake") @@ -41,7 +42,6 @@ group(:development, :test) do gem("aasm", require: false) gem("bcrypt", require: false) gem("xpath", require: false) - gem("rubocop-lsp", require: false) # net-smtp was removed from default gems in Ruby 3.1, but is used by the `mail` gem. # So we need to add it as a dependency until `mail` is fixed: diff --git a/Gemfile.lock b/Gemfile.lock index 2d4487968..bb3f36f33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -256,15 +256,16 @@ GEM unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.17.0) parser (>= 3.1.1.0) - rubocop-lsp (0.1.6) - language_server-protocol (>= 3.16) - rubocop (>= 1.0) rubocop-rspec (2.10.0) rubocop (~> 1.19) rubocop-shopify (2.5.0) rubocop (~> 1.25) rubocop-sorbet (0.6.8) rubocop (>= 0.90.0) + ruby-lsp (0.0.2) + language_server-protocol + rubocop (>= 1.0) + syntax_tree (>= 2.3) ruby-progressbar (1.11.0) shopify-money (0.16.0) sidekiq (6.4.2) @@ -297,6 +298,7 @@ GEM sqlite3 (1.4.2) state_machines (0.5.0) strscan (3.0.1) + syntax_tree (2.3.1) thor (1.2.1) timeout (0.2.0) tzinfo (2.0.4) @@ -339,10 +341,10 @@ DEPENDENCIES pry-byebug rails rake - rubocop-lsp rubocop-rspec rubocop-shopify rubocop-sorbet (>= 0.4.1) + ruby-lsp shopify-money sidekiq smart_properties diff --git a/sorbet/rbi/gems/rubocop-lsp@0.1.6.rbi b/sorbet/rbi/gems/ruby-lsp@0.0.2.rbi similarity index 57% rename from sorbet/rbi/gems/rubocop-lsp@0.1.6.rbi rename to sorbet/rbi/gems/ruby-lsp@0.0.2.rbi index c4b83925e..49613f300 100644 --- a/sorbet/rbi/gems/rubocop-lsp@0.1.6.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.0.2.rbi @@ -1,9 +1,7 @@ # typed: true # DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-lsp` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-lsp`. +# This is an autogenerated file for types exported from the `ruby-lsp` gem. +# Please instead update this file by running `bin/tapioca gem ruby-lsp`. -module Rubocop; end -module Rubocop::Lsp; end -Rubocop::Lsp::VERSION = T.let(T.unsafe(nil), String) +module RubyLsp; end diff --git a/sorbet/rbi/gems/syntax_tree@2.3.1.rbi b/sorbet/rbi/gems/syntax_tree@2.3.1.rbi new file mode 100644 index 000000000..a7b3fb4cd --- /dev/null +++ b/sorbet/rbi/gems/syntax_tree@2.3.1.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `syntax_tree` gem. +# Please instead update this file by running `bin/tapioca gem syntax_tree`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires