xlsxrb 0.1.6 → 0.1.8

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.
data/docs/wasm/ruby.wasm CHANGED
Binary file
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ruby_lsp/addon"
4
+ require_relative "completion_listener"
5
+ require_relative "../../xlsxrb/version"
6
+
7
+ module RubyLsp
8
+ module Xlsxrb
9
+ # Ruby LSP Add-on for xlsxrb.
10
+ #
11
+ # [Context & Lifecycle Note]
12
+ # This add-on serves as a bridge/polyfill for current Ruby LSP environments.
13
+ # While xlsxrb ships with complete RBS signatures (`sig/generated/`), Ruby LSP's
14
+ # type inferrer does not yet perform automatic static type inference from method
15
+ # block signatures to block parameters (e.g., `Xlsxrb.write do |wb|`).
16
+ #
17
+ # This add-on enables immediate out-of-the-box autocompletion and rich Markdown
18
+ # documentation across all public block arguments.
19
+ #
20
+ # As the Ruby tooling ecosystem evolves and Ruby LSP gains native block argument
21
+ # type resolution from gem RBS signatures in the future, this add-on will become
22
+ # redundant and can eventually be deprecated or removed.
23
+ class Addon < ::RubyLsp::Addon
24
+ def activate(global_state, _message_queue)
25
+ @global_state = global_state
26
+ end
27
+
28
+ def deactivate; end
29
+
30
+ def name
31
+ "xlsxrb"
32
+ end
33
+
34
+ def version
35
+ ::Xlsxrb::VERSION
36
+ end
37
+
38
+ def create_completion_listener(response_builder, node_context, dispatcher, _uri = nil)
39
+ CompletionListener.new(response_builder, node_context, dispatcher, @global_state)
40
+ end
41
+ end
42
+ end
43
+ end