Documentation
¶
Overview ¶
Package template contains code for dealing with templates
Index ¶
- func Completion(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, ...) (*protocol.CompletionList, error)
- func Definition(snapshot *cache.Snapshot, fh file.Handle, loc protocol.Position) ([]protocol.Location, error)
- func Diagnostics(snapshot *cache.Snapshot) map[protocol.DocumentURI][]*cache.Diagnostic
- func DocumentSymbols(snapshot *cache.Snapshot, fh file.Handle) ([]protocol.DocumentSymbol, error)
- func Highlight(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, ...) ([]protocol.DocumentHighlight, error)
- func Hover(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, ...) (*protocol.Hover, error)
- func References(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, ...) ([]protocol.Location, error)
- func SemanticTokens(ctx context.Context, snapshot *cache.Snapshot, spn protocol.DocumentURI) (*protocol.SemanticTokens, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Completion ¶
func Definition ¶
func Definition(snapshot *cache.Snapshot, fh file.Handle, loc protocol.Position) ([]protocol.Location, error)
Definition finds the definitions of the symbol at loc. It does not understand scoping (if any) in templates. This code is for definitions, type definitions, and implementations. Results only for variables and templates.
func Diagnostics ¶
func Diagnostics(snapshot *cache.Snapshot) map[protocol.DocumentURI][]*cache.Diagnostic
Diagnostics returns parse errors. There is only one per file. The errors are not always helpful. For instance { {end}} will likely point to the end of the file.
func DocumentSymbols ¶
DocumentSymbols returns a hierarchy of the symbols defined in a template file. (The hierarchy is flat. SymbolInformation might be better.)
func References ¶
func SemanticTokens ¶
func SemanticTokens(ctx context.Context, snapshot *cache.Snapshot, spn protocol.DocumentURI) (*protocol.SemanticTokens, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.