Class: RubyLsp::RubyLspRubyfmt::Addon
- Inherits:
-
Addon
- Object
- Addon
- RubyLsp::RubyLspRubyfmt::Addon
- Defined in:
- lib/ruby_lsp/ruby-lsp-rubyfmt/addon.rb
Instance Method Summary collapse
Instance Method Details
#activate ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ruby_lsp/ruby-lsp-rubyfmt/addon.rb', line 13 def activate # The first argument is an identifier users can pick to select this formatter. To use this formatter, users must # have rubyLsp.formatter configured to "rubyfmt" # The second argument is a singleton instance that implements the `FormatterRunner` interface (see below) RubyLsp::Requests::Formatting.register_formatter("rubyfmt", RubyFmtFormatterRunner.instance) end |
#deactivate ⇒ Object
20 21 |
# File 'lib/ruby_lsp/ruby-lsp-rubyfmt/addon.rb', line 20 def deactivate end |
#name ⇒ Object
9 10 11 |
# File 'lib/ruby_lsp/ruby-lsp-rubyfmt/addon.rb', line 9 def name "Ruby Fmt Formatter" end |