Class: LSP::SymbolInformation
Overview
export interface SymbolInformation { /** * The name of this symbol. / name: string; /* * The kind of this symbol. / kind: SymbolKind; /* * Indicates if this symbol is deprecated. / deprecated?: boolean; /* * The location of this symbol. The location's range is used by a tool * to reveal the location in the editor. If the symbol is selected in the * tool the range's start information is used to position the cursor. So * the range usually spans more than the actual symbol's name and does * normally include thinks like visibility modifiers. * * The range doesn't have to denote a node range in the sense of a abstract * syntax tree. It can therefore not be used to re-construct a hierarchy of * the symbols. / location: Location; /* * The name of the symbol containing this symbol. This information is for * user interface purposes (e.g. to render a qualifier in the user interface * if necessary). It can't be used to re-infer a hierarchy for the document * symbols. */ containerName?: string; }
Instance Attribute Summary collapse
-
#containerName ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string.
-
#deprecated ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string.
-
#kind ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string.
-
#location ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string.
-
#name ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ SymbolInformation
constructor
A new instance of SymbolInformation.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ SymbolInformation
Returns a new instance of SymbolInformation.
1107 1108 1109 1110 |
# File 'lib/lsp/lsp_types.rb', line 1107 def initialize(initial_hash = nil) super @optional_method_names = %i[deprecated containerName] end |
Instance Attribute Details
#containerName ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string
1105 1106 1107 |
# File 'lib/lsp/lsp_types.rb', line 1105 def containerName @containerName end |
#deprecated ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string
1105 1106 1107 |
# File 'lib/lsp/lsp_types.rb', line 1105 def deprecated @deprecated end |
#kind ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string
1105 1106 1107 |
# File 'lib/lsp/lsp_types.rb', line 1105 def kind @kind end |
#location ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string
1105 1106 1107 |
# File 'lib/lsp/lsp_types.rb', line 1105 def location @location end |
#name ⇒ Object
type: string # type: SymbolKind # type: boolean # type: Location # type: string
1105 1106 1107 |
# File 'lib/lsp/lsp_types.rb', line 1105 def name @name end |
Instance Method Details
#from_h!(value) ⇒ Object
1112 1113 1114 1115 1116 1117 1118 1119 1120 |
# File 'lib/lsp/lsp_types.rb', line 1112 def from_h!(value) value = {} if value.nil? self.name = value['name'] self.kind = value['kind'] # Unknown type self.deprecated = value['deprecated'] # Unknown type self.location = Location.new(value['location']) unless value['location'].nil? self.containerName = value['containerName'] self end |