t-ruby 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ff23c88b45e7a1f1c189bd3a9774d80877bc34024f2faa6475fccf2c063019f
4
- data.tar.gz: 8c8ec1a3b6964f72ea75144624099d8dadf8e27c893e0608b2147377db5eeeab
3
+ metadata.gz: 054211b0b7c63b2f1b66b3cfed976385174c1b3f5904ea04357599b3c7440e8f
4
+ data.tar.gz: 0aa86d48811cff1bc7d7652155055f5041c0bef8e372b9dcec4a06a716534799
5
5
  SHA512:
6
- metadata.gz: 252399c336495e2c261cc137e9612d8f3076ae7e77a01fe827f9252357c693f8870482629bc8e858d9451fd377940abd1ba927ccbfa222fa29b9f34d5eb37f9e
7
- data.tar.gz: 82d876865a19cece6684474f09bbab7185fb2947070f2aeda5c9d5cd0dd6b250443f0595c88674748a351d2902ac7a4cc6e243c85ebfe34b6692f82d48252b1d
6
+ metadata.gz: 73ba77dc237a8455dd60b0c098de4372cd6e9f76e00619a54669af04fd46deca80c8c6fb1c3322114442ea38a471f18f722fc66018ad14cf31469ed153c11bc8
7
+ data.tar.gz: 5b6c3d2d3a895f941949d79407cb2e0ce91c3d1b3a13d7e113cd02be1a8fbdd9a82fb86bf6ac1d99832d4e331861c8657b516836b334aa73c8175273835c6da5
@@ -234,6 +234,8 @@ module TRuby
234
234
  handle_definition(params)
235
235
  when "textDocument/semanticTokens/full"
236
236
  handle_semantic_tokens_full(params)
237
+ when "textDocument/diagnostic"
238
+ handle_diagnostic(params)
237
239
  else
238
240
  { error: { code: ErrorCodes::METHOD_NOT_FOUND, message: "Method not found: #{method}" } }
239
241
  end
@@ -342,6 +344,21 @@ module TRuby
342
344
 
343
345
  # === Diagnostics ===
344
346
 
347
+ # Handle pull-based diagnostics (LSP 3.17+)
348
+ def handle_diagnostic(params)
349
+ uri = params.dig("textDocument", "uri")
350
+ return { "kind" => "full", "items" => [] } unless uri
351
+
352
+ doc = @documents[uri]
353
+ return { "kind" => "full", "items" => [] } unless doc
354
+
355
+ text = doc[:text]
356
+ return { "kind" => "full", "items" => [] } unless text
357
+
358
+ diagnostics = analyze_document(text)
359
+ { "kind" => "full", "items" => diagnostics }
360
+ end
361
+
345
362
  def publish_diagnostics(uri, text)
346
363
  diagnostics = analyze_document(text)
347
364
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TRuby
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: t-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Y. Fred Kim