ruby-lsp 0.17.11 → 0.17.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/exe/ruby-lsp +4 -4
- data/exe/ruby-lsp-check +1 -1
- data/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +20 -3
- data/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb +26 -0
- data/lib/ruby_indexer/lib/ruby_indexer/entry.rb +23 -0
- data/lib/ruby_indexer/lib/ruby_indexer/index.rb +76 -2
- data/lib/ruby_indexer/ruby_indexer.rb +1 -8
- data/lib/ruby_indexer/test/configuration_test.rb +1 -1
- data/lib/ruby_indexer/test/enhancements_test.rb +197 -0
- data/lib/ruby_lsp/addon.rb +9 -4
- data/lib/ruby_lsp/base_server.rb +7 -2
- data/lib/ruby_lsp/document.rb +0 -30
- data/lib/ruby_lsp/global_state.rb +33 -13
- data/lib/ruby_lsp/listeners/completion.rb +5 -5
- data/lib/ruby_lsp/listeners/definition.rb +3 -3
- data/lib/ruby_lsp/listeners/hover.rb +9 -6
- data/lib/ruby_lsp/listeners/signature_help.rb +1 -1
- data/lib/ruby_lsp/requests/code_action_resolve.rb +105 -7
- data/lib/ruby_lsp/requests/code_actions.rb +6 -0
- data/lib/ruby_lsp/requests/completion.rb +1 -1
- data/lib/ruby_lsp/requests/completion_resolve.rb +1 -0
- data/lib/ruby_lsp/requests/definition.rb +1 -1
- data/lib/ruby_lsp/requests/hover.rb +1 -1
- data/lib/ruby_lsp/requests/signature_help.rb +1 -1
- data/lib/ruby_lsp/requests/support/common.rb +2 -2
- data/lib/ruby_lsp/ruby_document.rb +64 -0
- data/lib/ruby_lsp/server.rb +33 -11
- data/lib/ruby_lsp/utils.rb +12 -0
- metadata +5 -3
data/lib/ruby_lsp/utils.rb
CHANGED
@@ -53,6 +53,7 @@ module RubyLsp
|
|
53
53
|
class Notification < Message
|
54
54
|
class << self
|
55
55
|
extend T::Sig
|
56
|
+
|
56
57
|
sig { params(message: String).returns(Notification) }
|
57
58
|
def window_show_error(message)
|
58
59
|
new(
|
@@ -63,6 +64,14 @@ module RubyLsp
|
|
63
64
|
),
|
64
65
|
)
|
65
66
|
end
|
67
|
+
|
68
|
+
sig { params(message: String, type: Integer).returns(Notification) }
|
69
|
+
def window_log_message(message, type: Constant::MessageType::LOG)
|
70
|
+
new(
|
71
|
+
method: "window/logMessage",
|
72
|
+
params: Interface::LogMessageParams.new(type: type, message: message),
|
73
|
+
)
|
74
|
+
end
|
66
75
|
end
|
67
76
|
|
68
77
|
extend T::Sig
|
@@ -122,6 +131,9 @@ module RubyLsp
|
|
122
131
|
sig { returns(T.untyped) }
|
123
132
|
attr_reader :response
|
124
133
|
|
134
|
+
sig { returns(Integer) }
|
135
|
+
attr_reader :id
|
136
|
+
|
125
137
|
sig { params(id: Integer, response: T.untyped).void }
|
126
138
|
def initialize(id:, response:)
|
127
139
|
@id = id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: language_server-protocol
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/ruby-lsp.rb
|
99
99
|
- lib/ruby_indexer/lib/ruby_indexer/configuration.rb
|
100
100
|
- lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb
|
101
|
+
- lib/ruby_indexer/lib/ruby_indexer/enhancement.rb
|
101
102
|
- lib/ruby_indexer/lib/ruby_indexer/entry.rb
|
102
103
|
- lib/ruby_indexer/lib/ruby_indexer/index.rb
|
103
104
|
- lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb
|
@@ -108,6 +109,7 @@ files:
|
|
108
109
|
- lib/ruby_indexer/test/classes_and_modules_test.rb
|
109
110
|
- lib/ruby_indexer/test/configuration_test.rb
|
110
111
|
- lib/ruby_indexer/test/constant_test.rb
|
112
|
+
- lib/ruby_indexer/test/enhancements_test.rb
|
111
113
|
- lib/ruby_indexer/test/index_test.rb
|
112
114
|
- lib/ruby_indexer/test/instance_variables_test.rb
|
113
115
|
- lib/ruby_indexer/test/method_test.rb
|
@@ -204,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
206
|
- !ruby/object:Gem::Version
|
205
207
|
version: '0'
|
206
208
|
requirements: []
|
207
|
-
rubygems_version: 3.5.
|
209
|
+
rubygems_version: 3.5.17
|
208
210
|
signing_key:
|
209
211
|
specification_version: 4
|
210
212
|
summary: An opinionated language server for Ruby
|