Documentation ¶
Index ¶
- Constants
- Variables
- type Address
- type AddressStep
- type AttrStep
- type Candidate
- type CandidateKind
- type Candidates
- type CodeLens
- type CodeLensFunc
- type Command
- type CommandArgument
- type CompletionHook
- type CompletionHooks
- type DiagnosticsMap
- type FunctionParameter
- type FunctionSignature
- type HoverData
- type IndexStep
- type Link
- type LiteralTypeKind
- type MarkupContent
- type MarkupKind
- type ObjectConsExprKind
- type Path
- type ReferenceExprKind
- type ResolveHook
- type RootStep
- type ScopeId
- type SemanticToken
- type SemanticTokenModifier
- type SemanticTokenModifiers
- type SemanticTokenType
- type SemanticTokenTypes
- type SymbolExprKind
- type TextEdit
- type TupleConsExprKind
Constants ¶
const (
TokenModifierDependent = SemanticTokenModifier("hcl-dependent")
)
Variables ¶
var SupportedSemanticTokenTypes = SemanticTokenTypes{ TokenAttrName, TokenBlockType, TokenBlockLabel, TokenBool, TokenString, TokenNumber, TokenObjectKey, TokenMapKey, TokenKeyword, TokenReferenceStep, TokenTypeComplex, TokenTypePrimitive, TokenFunctionName, }
Functions ¶
This section is empty.
Types ¶
type AddressStep ¶
type AddressStep interface { String() string // contains filtered or unexported methods }
type Candidate ¶
type Candidate struct { Label string Description MarkupContent Detail string IsDeprecated bool TextEdit TextEdit AdditionalTextEdits []TextEdit Kind CandidateKind // TriggerSuggest allows server to instruct the client whether // to reopen candidate suggestion popup after insertion TriggerSuggest bool // ResolveHook allows resolution of additional information // for a completion candidate via ResolveCandidate. ResolveHook *ResolveHook // SortText is an optional string that will be used when comparing this // candidate with other candidates SortText string }
Candidate represents a completion candidate in the form of an attribute, block, or a label
type CandidateKind ¶
type CandidateKind uint
const ( NilCandidateKind CandidateKind = iota // structural kinds AttributeCandidateKind BlockCandidateKind LabelCandidateKind // expressions BoolCandidateKind KeywordCandidateKind ListCandidateKind MapCandidateKind NumberCandidateKind ObjectCandidateKind SetCandidateKind StringCandidateKind TupleCandidateKind ReferenceCandidateKind FunctionCandidateKind )
func (CandidateKind) String ¶
func (i CandidateKind) String() string
type Candidates ¶
Candidates represents a list of candidates and indication whether the list is complete or if it needs further filtering because there is too many candidates.
Decoder has an upper limit for the number of candidates it can return and when the limit is reached, the list is considered incomplete.
func CompleteCandidates ¶
func CompleteCandidates(list []Candidate) Candidates
CompleteCandidates creates a static (complete) list of candidates
NewCandidates should be used at runtime instead, but CompleteCandidates provides a syntactic sugar useful in tests.
func IncompleteCandidates ¶
func IncompleteCandidates(list []Candidate) Candidates
IncompleteCandidates creates a static list of candidates
NewCandidates should be used at runtime instead, but IncompleteCandidates provides a syntactic sugar useful in tests.
func NewCandidates ¶
func NewCandidates() Candidates
NewCandidates creates a new (incomplete) list of candidates to be appended to.
func ZeroCandidates ¶
func ZeroCandidates() Candidates
ZeroCandidates returns a (complete) "list" of no candidates
func (Candidates) Len ¶
func (ca Candidates) Len() int
func (Candidates) Less ¶
func (ca Candidates) Less(i, j int) bool
func (Candidates) Swap ¶
func (ca Candidates) Swap(i, j int)
type CodeLensFunc ¶
type Command ¶
type Command struct { Title string ID string Arguments []CommandArgument }
type CommandArgument ¶
type CompletionHook ¶
type CompletionHook struct {
Name string
}
type CompletionHooks ¶
type CompletionHooks []CompletionHook
func (CompletionHooks) Copy ¶
func (chs CompletionHooks) Copy() CompletionHooks
type DiagnosticsMap ¶
type DiagnosticsMap map[string]hcl.Diagnostics
func (DiagnosticsMap) Count ¶
func (dm DiagnosticsMap) Count() int
Count returns the number of diagnostics for all files
func (DiagnosticsMap) Extend ¶
func (dm DiagnosticsMap) Extend(diagMap DiagnosticsMap) DiagnosticsMap
type FunctionParameter ¶
type FunctionParameter struct { Name string // Description is an optional human-readable description // of the parameter. Description MarkupContent }
type FunctionSignature ¶
type FunctionSignature struct { Name string // Description is an optional human-readable description // of the function. Description MarkupContent // Parameters is an ordered list of the function's parameters. Parameters []FunctionParameter // ActiveParameter is an index marking the parameter a user is currently // editing. It should lie inside the range of Parameters. ActiveParameter uint32 }
type HoverData ¶
type HoverData struct { Content MarkupContent Range hcl.Range }
type LiteralTypeKind ¶
type MarkupContent ¶
type MarkupContent struct { Value string Kind MarkupKind }
MarkupContent represents human-readable content which can be represented as Markdown or plaintext for backwards-compatible reasons.
func Markdown ¶
func Markdown(value string) MarkupContent
func PlainText ¶
func PlainText(value string) MarkupContent
type MarkupKind ¶
type MarkupKind uint
const ( NilKind MarkupKind = iota PlainTextKind MarkdownKind )
func (MarkupKind) String ¶
func (i MarkupKind) String() string
type ObjectConsExprKind ¶
type ObjectConsExprKind struct{}
type ReferenceExprKind ¶
type ReferenceExprKind struct{}
type ResolveHook ¶
type SemanticToken ¶
type SemanticToken struct { Type SemanticTokenType Modifiers SemanticTokenModifiers Range hcl.Range }
type SemanticTokenModifier ¶
type SemanticTokenModifier string
type SemanticTokenModifiers ¶
type SemanticTokenModifiers []SemanticTokenModifier
func (SemanticTokenModifiers) Copy ¶
func (stm SemanticTokenModifiers) Copy() SemanticTokenModifiers
type SemanticTokenType ¶
type SemanticTokenType string
const ( // structural tokens TokenAttrName SemanticTokenType = "hcl-attrName" TokenBlockType SemanticTokenType = "hcl-blockType" TokenBlockLabel SemanticTokenType = "hcl-blockLabel" // expressions TokenBool SemanticTokenType = "hcl-bool" TokenString SemanticTokenType = "hcl-string" TokenNumber SemanticTokenType = "hcl-number" TokenObjectKey SemanticTokenType = "hcl-objectKey" TokenMapKey SemanticTokenType = "hcl-mapKey" TokenKeyword SemanticTokenType = "hcl-keyword" TokenReferenceStep SemanticTokenType = "hcl-referenceStep" TokenTypeComplex SemanticTokenType = "hcl-typeComplex" TokenTypePrimitive SemanticTokenType = "hcl-typePrimitive" TokenFunctionName SemanticTokenType = "hcl-functionName" )
type SemanticTokenTypes ¶
type SemanticTokenTypes []SemanticTokenType
type SymbolExprKind ¶
type SymbolExprKind interface {
// contains filtered or unexported methods
}
type TextEdit ¶
TextEdit represents a change (edit) of an HCL config file in the form of a Snippet *and* NewText to replace the given Range.
Snippet and NewText are equivalent, but NewText is provided for backwards-compatible reasons. Snippet uses 1-indexed placeholders, such as name = ${1:value}.
type TupleConsExprKind ¶
type TupleConsExprKind struct{}