Skip to content

Commit

Permalink
Updates for Ruby LSP v0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Jan 6, 2025
1 parent 906212c commit 0cad07a
Show file tree
Hide file tree
Showing 36 changed files with 12,981 additions and 10,019 deletions.
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
ruby-lsp-rails (0.3.27)
ruby-lsp (>= 0.22.0, < 0.23.0)
ruby-lsp (>= 0.23.0, < 0.24.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -102,7 +102,7 @@ GEM
reline (>= 0.4.2)
json (2.7.6)
language_server-protocol (3.17.0.3)
logger (1.6.1)
logger (1.6.4)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -139,7 +139,7 @@ GEM
parser (3.3.6.0)
ast (~> 2.4.1)
racc
prism (1.2.0)
prism (1.3.0)
psych (5.2.0)
stringio
puma (6.4.3)
Expand Down Expand Up @@ -183,10 +183,10 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
rbi (0.2.1)
rbi (0.2.2)
prism (~> 1.0)
sorbet-runtime (>= 0.5.9204)
rbs (3.6.1)
rbs (3.8.1)
logger
rdoc (6.7.0)
psych (>= 4.0.0)
Expand Down Expand Up @@ -214,7 +214,7 @@ GEM
rubocop (~> 1.51)
rubocop-sorbet (0.8.7)
rubocop (>= 1)
ruby-lsp (0.22.0)
ruby-lsp (0.23.0)
language_server-protocol (~> 3.17.0)
prism (>= 1.2, < 2.0)
rbs (>= 3, < 4)
Expand All @@ -240,7 +240,7 @@ GEM
sqlite3 (2.1.0-x86_64-darwin)
sqlite3 (2.1.0-x86_64-linux-gnu)
stringio (3.1.2)
tapioca (0.16.3)
tapioca (0.16.5)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
Expand All @@ -253,7 +253,7 @@ GEM
timeout (0.4.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2024.1)
tzinfo-data (1.2024.2)
tzinfo (>= 1.0.0)
unicode-display_width (2.6.0)
uri (1.0.1)
Expand Down
1 change: 1 addition & 0 deletions lib/ruby_lsp/ruby_lsp_rails/addon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def create_completion_listener(response_builder, node_context, dispatcher, uri)
Completion.new(@rails_runner_client, response_builder, node_context, dispatcher, uri)
end


sig { params(changes: T::Array[{ uri: String, type: Integer }]).void }
def workspace_did_change_watched_files(changes)
if changes.any? { |c| c[:uri].end_with?("db/schema.rb") || c[:uri].end_with?("structure.sql") }
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lsp/ruby_lsp_rails/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def collect_definitions(name)

methods.each do |target_method|
location = target_method.location
file_path = target_method.file_path
file_path = T.must(target_method.file_path)

@response_builder << Interface::Location.new(
uri: URI::Generic.from_path(path: file_path).to_s,
Expand Down
2 changes: 1 addition & 1 deletion ruby-lsp-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
Dir["lib/**/*", "LICENSE.txt", "Rakefile", "README.md"]
end

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

0 comments on commit 0cad07a

Please sign in to comment.