Class: LSP::DocumentOnTypeFormattingRegistrationOptions
- Defined in:
- lib/lsp/lsp_protocol.rb
Overview
export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions { }
Instance Attribute Summary collapse
-
#documentSelector ⇒ Object
type: DocumentSelector | null # type: string # type: string[].
-
#firstTriggerCharacter ⇒ Object
type: DocumentSelector | null # type: string # type: string[].
-
#moreTriggerCharacter ⇒ Object
type: DocumentSelector | null # type: string # type: string[].
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ DocumentOnTypeFormattingRegistrationOptions
constructor
A new instance of DocumentOnTypeFormattingRegistrationOptions.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ DocumentOnTypeFormattingRegistrationOptions
Returns a new instance of DocumentOnTypeFormattingRegistrationOptions.
2454 2455 2456 2457 |
# File 'lib/lsp/lsp_protocol.rb', line 2454 def initialize(initial_hash = nil) super @optional_method_names = %i[moreTriggerCharacter] end |
Instance Attribute Details
#documentSelector ⇒ Object
type: DocumentSelector | null # type: string # type: string[]
2452 2453 2454 |
# File 'lib/lsp/lsp_protocol.rb', line 2452 def documentSelector @documentSelector end |
#firstTriggerCharacter ⇒ Object
type: DocumentSelector | null # type: string # type: string[]
2452 2453 2454 |
# File 'lib/lsp/lsp_protocol.rb', line 2452 def firstTriggerCharacter @firstTriggerCharacter end |
#moreTriggerCharacter ⇒ Object
type: DocumentSelector | null # type: string # type: string[]
2452 2453 2454 |
# File 'lib/lsp/lsp_protocol.rb', line 2452 def moreTriggerCharacter @moreTriggerCharacter end |
Instance Method Details
#from_h!(value) ⇒ Object
2459 2460 2461 2462 2463 2464 2465 |
# File 'lib/lsp/lsp_protocol.rb', line 2459 def from_h!(value) value = {} if value.nil? self.documentSelector = value['documentSelector'] # Unknown type self.firstTriggerCharacter = value['firstTriggerCharacter'] self.moreTriggerCharacter = value['moreTriggerCharacter'].map { |val| val } unless value['moreTriggerCharacter'].nil? self end |