Skip to content

Commit 6ff9eb8

Browse files
committed
Updates for Ruby LSP v0.23
1 parent 906212c commit 6ff9eb8

37 files changed

+12980
-10128
lines changed

Gemfile.lock

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: .
33
specs:
44
ruby-lsp-rails (0.3.27)
5-
ruby-lsp (>= 0.22.0, < 0.23.0)
5+
ruby-lsp (>= 0.23.0, < 0.24.0)
66

77
GEM
88
remote: https://rubygems.org/
@@ -102,7 +102,7 @@ GEM
102102
reline (>= 0.4.2)
103103
json (2.7.6)
104104
language_server-protocol (3.17.0.3)
105-
logger (1.6.1)
105+
logger (1.6.4)
106106
loofah (2.23.1)
107107
crass (~> 1.0.2)
108108
nokogiri (>= 1.12.0)
@@ -129,8 +129,6 @@ GEM
129129
nio4r (2.7.4)
130130
nokogiri (1.16.7-arm64-darwin)
131131
racc (~> 1.4)
132-
nokogiri (1.16.7-x64-mingw-ucrt)
133-
racc (~> 1.4)
134132
nokogiri (1.16.7-x86_64-darwin)
135133
racc (~> 1.4)
136134
nokogiri (1.16.7-x86_64-linux)
@@ -139,7 +137,7 @@ GEM
139137
parser (3.3.6.0)
140138
ast (~> 2.4.1)
141139
racc
142-
prism (1.2.0)
140+
prism (1.3.0)
143141
psych (5.2.0)
144142
stringio
145143
puma (6.4.3)
@@ -183,10 +181,10 @@ GEM
183181
zeitwerk (~> 2.6)
184182
rainbow (3.1.1)
185183
rake (13.2.1)
186-
rbi (0.2.1)
184+
rbi (0.2.2)
187185
prism (~> 1.0)
188186
sorbet-runtime (>= 0.5.9204)
189-
rbs (3.6.1)
187+
rbs (3.8.1)
190188
logger
191189
rdoc (6.7.0)
192190
psych (>= 4.0.0)
@@ -214,7 +212,7 @@ GEM
214212
rubocop (~> 1.51)
215213
rubocop-sorbet (0.8.7)
216214
rubocop (>= 1)
217-
ruby-lsp (0.22.0)
215+
ruby-lsp (0.23.0)
218216
language_server-protocol (~> 3.17.0)
219217
prism (>= 1.2, < 2.0)
220218
rbs (>= 3, < 4)
@@ -236,11 +234,10 @@ GEM
236234
sorbet-static-and-runtime (>= 0.5.10187)
237235
thor (>= 0.19.2)
238236
sqlite3 (2.1.0-arm64-darwin)
239-
sqlite3 (2.1.0-x64-mingw-ucrt)
240237
sqlite3 (2.1.0-x86_64-darwin)
241238
sqlite3 (2.1.0-x86_64-linux-gnu)
242239
stringio (3.1.2)
243-
tapioca (0.16.3)
240+
tapioca (0.16.5)
244241
bundler (>= 2.2.25)
245242
netrc (>= 0.11.0)
246243
parallel (>= 1.21.0)
@@ -253,7 +250,7 @@ GEM
253250
timeout (0.4.2)
254251
tzinfo (2.0.6)
255252
concurrent-ruby (~> 1.0)
256-
tzinfo-data (1.2024.1)
253+
tzinfo-data (1.2024.2)
257254
tzinfo (>= 1.0.0)
258255
unicode-display_width (2.6.0)
259256
uri (1.0.1)
@@ -269,7 +266,6 @@ GEM
269266

270267
PLATFORMS
271268
arm64-darwin
272-
x64-mingw-ucrt
273269
x86_64-darwin
274270
x86_64-linux
275271

lib/ruby_lsp/ruby_lsp_rails/addon.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
require_relative "code_lens"
1414
require_relative "document_symbol"
1515
require_relative "definition"
16-
require_relative "completion"
1716
require_relative "indexing_enhancement"
1817

1918
module RubyLsp
@@ -120,18 +119,6 @@ def create_definition_listener(response_builder, uri, node_context, dispatcher)
120119
Definition.new(@rails_runner_client, response_builder, node_context, index, dispatcher)
121120
end
122121

123-
sig do
124-
override.params(
125-
response_builder: ResponseBuilders::CollectionResponseBuilder[Interface::CompletionItem],
126-
node_context: NodeContext,
127-
dispatcher: Prism::Dispatcher,
128-
uri: URI::Generic,
129-
).void
130-
end
131-
def create_completion_listener(response_builder, node_context, dispatcher, uri)
132-
Completion.new(@rails_runner_client, response_builder, node_context, dispatcher, uri)
133-
end
134-
135122
sig { params(changes: T::Array[{ uri: String, type: Integer }]).void }
136123
def workspace_did_change_watched_files(changes)
137124
if changes.any? { |c| c[:uri].end_with?("db/schema.rb") || c[:uri].end_with?("structure.sql") }

lib/ruby_lsp/ruby_lsp_rails/completion.rb

Lines changed: 0 additions & 92 deletions
This file was deleted.

lib/ruby_lsp/ruby_lsp_rails/definition.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def collect_definitions(name)
145145

146146
methods.each do |target_method|
147147
location = target_method.location
148-
file_path = target_method.file_path
148+
file_path = T.must(target_method.file_path)
149149

150150
@response_builder << Interface::Location.new(
151151
uri: URI::Generic.from_path(path: file_path).to_s,

ruby-lsp-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
2424
Dir["lib/**/*", "LICENSE.txt", "Rakefile", "README.md"]
2525
end
2626

27-
spec.add_dependency("ruby-lsp", ">= 0.22.0", "< 0.23.0")
27+
spec.add_dependency("ruby-lsp", ">= 0.23.0", "< 0.24.0")
2828
end

0 commit comments

Comments
 (0)