Class: LSP::DocumentOnTypeFormattingOptions
- Defined in:
- lib/lsp/lsp_protocol.rb
Overview
export interface DocumentOnTypeFormattingOptions
/**
* A character on which formatting should be triggered, like ``.
*/
firstTriggerCharacter: string;
/**
* More trigger characters.
*/
moreTriggerCharacter?: string[];
}
Instance Attribute Summary collapse
-
#firstTriggerCharacter ⇒ Object
type: string # type: string[].
-
#moreTriggerCharacter ⇒ Object
type: string # type: string[].
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ DocumentOnTypeFormattingOptions
constructor
A new instance of DocumentOnTypeFormattingOptions.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ DocumentOnTypeFormattingOptions
Returns a new instance of DocumentOnTypeFormattingOptions.
2436 2437 2438 2439 |
# File 'lib/lsp/lsp_protocol.rb', line 2436 def initialize(initial_hash = nil) super @optional_method_names = %i[moreTriggerCharacter] end |
Instance Attribute Details
#firstTriggerCharacter ⇒ Object
type: string # type: string[]
2434 2435 2436 |
# File 'lib/lsp/lsp_protocol.rb', line 2434 def firstTriggerCharacter @firstTriggerCharacter end |
#moreTriggerCharacter ⇒ Object
type: string # type: string[]
2434 2435 2436 |
# File 'lib/lsp/lsp_protocol.rb', line 2434 def moreTriggerCharacter @moreTriggerCharacter end |
Instance Method Details
#from_h!(value) ⇒ Object
2441 2442 2443 2444 2445 2446 |
# File 'lib/lsp/lsp_protocol.rb', line 2441 def from_h!(value) value = {} if value.nil? self.firstTriggerCharacter = value['firstTriggerCharacter'] self.moreTriggerCharacter = value['moreTriggerCharacter'].map { |val| val } unless value['moreTriggerCharacter'].nil? self end |