Class: RubyLsp::Xlsxrb::Addon
- Inherits:
-
Addon
- Object
- Addon
- RubyLsp::Xlsxrb::Addon
- Defined in:
- lib/ruby_lsp/xlsxrb/addon.rb
Overview
Ruby LSP Add-on for xlsxrb.
[Context & Lifecycle Note]
This add-on serves as a bridge/polyfill for current Ruby LSP environments.
While xlsxrb ships with complete RBS signatures (sig/generated/), Ruby LSP's
type inferrer does not yet perform automatic static type inference from method
block signatures to block parameters (e.g., Xlsxrb.generate do |wb|).
This add-on enables immediate out-of-the-box autocompletion and rich Markdown documentation across all public block arguments.
As the Ruby tooling ecosystem evolves and Ruby LSP gains native block argument type resolution from gem RBS signatures in the future, this add-on will become redundant and can eventually be deprecated or removed.
Instance Method Summary collapse
- #activate(global_state, _message_queue) ⇒ Object
- #create_completion_listener(response_builder, node_context, dispatcher, _uri = nil) ⇒ Object
- #deactivate ⇒ Object
- #name ⇒ Object
- #version ⇒ Object
Instance Method Details
#activate(global_state, _message_queue) ⇒ Object
24 25 26 |
# File 'lib/ruby_lsp/xlsxrb/addon.rb', line 24 def activate(global_state, ) @global_state = global_state end |
#create_completion_listener(response_builder, node_context, dispatcher, _uri = nil) ⇒ Object
38 39 40 |
# File 'lib/ruby_lsp/xlsxrb/addon.rb', line 38 def create_completion_listener(response_builder, node_context, dispatcher, _uri = nil) CompletionListener.new(response_builder, node_context, dispatcher, @global_state) end |
#deactivate ⇒ Object
28 |
# File 'lib/ruby_lsp/xlsxrb/addon.rb', line 28 def deactivate; end |
#name ⇒ Object
30 31 32 |
# File 'lib/ruby_lsp/xlsxrb/addon.rb', line 30 def name "xlsxrb" end |