Documentation
¶
Overview ¶
Package symbols provides document symbols.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeSymbol ¶
type AttributeSymbol struct {
AttrName string
ExprKind lang.SymbolExprKind
// contains filtered or unexported fields
}
AttributeSymbol is Symbol implementation representing an attribute
func (*AttributeSymbol) Equal ¶
func (as *AttributeSymbol) Equal(other Symbol) bool
func (*AttributeSymbol) Name ¶
func (as *AttributeSymbol) Name() string
func (*AttributeSymbol) NestedSymbols ¶
func (as *AttributeSymbol) NestedSymbols() []Symbol
func (*AttributeSymbol) Path ¶
func (as *AttributeSymbol) Path() lang.Path
func (*AttributeSymbol) Range ¶
func (as *AttributeSymbol) Range() hcl.Range
type BlockSymbol ¶
BlockSymbol is Symbol implementation representing a block
func (*BlockSymbol) Equal ¶
func (bs *BlockSymbol) Equal(other Symbol) bool
func (*BlockSymbol) Name ¶
func (bs *BlockSymbol) Name() string
func (*BlockSymbol) NestedSymbols ¶
func (bs *BlockSymbol) NestedSymbols() []Symbol
func (*BlockSymbol) Path ¶
func (bs *BlockSymbol) Path() lang.Path
func (*BlockSymbol) Range ¶
func (bs *BlockSymbol) Range() hcl.Range
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector collects symbols from documents.
type ExprSymbol ¶
type ExprSymbol struct {
ExprName string
ExprKind lang.SymbolExprKind
// contains filtered or unexported fields
}
func (*ExprSymbol) Equal ¶
func (as *ExprSymbol) Equal(other Symbol) bool
func (*ExprSymbol) Name ¶
func (as *ExprSymbol) Name() string
func (*ExprSymbol) NestedSymbols ¶
func (as *ExprSymbol) NestedSymbols() []Symbol
func (*ExprSymbol) Path ¶
func (as *ExprSymbol) Path() lang.Path
func (*ExprSymbol) Range ¶
func (as *ExprSymbol) Range() hcl.Range
type Symbol ¶
type Symbol interface {
Path() lang.Path
Name() string
NestedSymbols() []Symbol
Range() hcl.Range
// contains filtered or unexported methods
}
Symbol represents any attribute, or block (and its nested blocks or attributes)
func WorkspaceSymbols ¶
func WorkspaceSymbols(provider decoder.ContextProvider, query string) ([]Symbol, error)
WorkspaceSymbols finds all symbols in all modules that are currently open. Note that this is buggy in that it doesn't load symbols from modules that are not being edited.
Click to show internal directories.
Click to hide internal directories.