ruby-lsp 0.23.1 → 0.23.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -142,6 +142,20 @@ module RubyLsp
142
142
  ),
143
143
  )
144
144
  end
145
+
146
+ sig do
147
+ params(
148
+ uri: String,
149
+ diagnostics: T::Array[Interface::Diagnostic],
150
+ version: T.nilable(Integer),
151
+ ).returns(Notification)
152
+ end
153
+ def publish_diagnostics(uri, diagnostics, version: nil)
154
+ new(
155
+ method: "textDocument/publishDiagnostics",
156
+ params: Interface::PublishDiagnosticsParams.new(uri: uri, diagnostics: diagnostics, version: version),
157
+ )
158
+ end
145
159
  end
146
160
 
147
161
  extend T::Sig
@@ -155,6 +169,35 @@ module RubyLsp
155
169
  class Request < Message
156
170
  extend T::Sig
157
171
 
172
+ class << self
173
+ extend T::Sig
174
+
175
+ sig { params(id: Integer, pattern: T.any(Interface::RelativePattern, String), kind: Integer).returns(Request) }
176
+ def register_watched_files(
177
+ id,
178
+ pattern,
179
+ kind: Constant::WatchKind::CREATE | Constant::WatchKind::CHANGE | Constant::WatchKind::DELETE
180
+ )
181
+ new(
182
+ id: id,
183
+ method: "client/registerCapability",
184
+ params: Interface::RegistrationParams.new(
185
+ registrations: [
186
+ Interface::Registration.new(
187
+ id: "workspace/didChangeWatchedFiles",
188
+ method: "workspace/didChangeWatchedFiles",
189
+ register_options: Interface::DidChangeWatchedFilesRegistrationOptions.new(
190
+ watchers: [
191
+ Interface::FileSystemWatcher.new(glob_pattern: pattern, kind: kind),
192
+ ],
193
+ ),
194
+ ),
195
+ ],
196
+ ),
197
+ )
198
+ end
199
+ end
200
+
158
201
  sig { params(id: T.any(Integer, String), method: String, params: Object).void }
159
202
  def initialize(id:, method:, params:)
160
203
  @id = id
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
4
+ version: 0.23.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-06 00:00:00.000000000 Z
10
+ date: 2025-01-08 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: language_server-protocol
@@ -106,6 +106,7 @@ files:
106
106
  - lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb
107
107
  - lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb
108
108
  - lib/ruby_indexer/lib/ruby_indexer/uri.rb
109
+ - lib/ruby_indexer/lib/ruby_indexer/visibility_scope.rb
109
110
  - lib/ruby_indexer/ruby_indexer.rb
110
111
  - lib/ruby_indexer/test/class_variables_test.rb
111
112
  - lib/ruby_indexer/test/classes_and_modules_test.rb