template

package
v0.0.0-...-477e0ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2025 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

Package template contains code for dealing with templates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

func DocumentSymbols(snapshot *cache.Snapshot, fh file.Handle) ([]protocol.DocumentSymbol, error)

DocumentSymbols returns a hierarchy of the symbols defined in a template file. (The hierarchy is flat. SymbolInformation might be better.)

func Highlight

func Highlight(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, loc protocol.Position) ([]protocol.DocumentHighlight, error)

func Hover

func Hover(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, position protocol.Position) (*protocol.Hover, error)

func References

func References(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, params *protocol.ReferenceParams) ([]protocol.Location, error)

func SemanticTokens

func SemanticTokens(ctx context.Context, snapshot *cache.Snapshot, spn protocol.DocumentURI) (*protocol.SemanticTokens, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL