gotools/gopls/internal/template/completion.go

type completer

func Completion(ctx context.Context, snapshot *cache.Snapshot, fh file.Handle, pos protocol.Position, context protocol.CompletionContext) (*protocol.CompletionList, error) {}

func filterSyms(syms map[string]symbol, ns []symbol) {}

// return the starting position of the enclosing token, or -1 if none
func inTemplate(fc *Parsed, pos protocol.Position) int {}

var keywords

var globals

// find the completions. start is the offset of either the Token enclosing pos, or where
// the incomplete token starts.
// The error return is always nil.
func (c *completer) complete() (*protocol.CompletionList, error) {}

// version of c.analyze that uses go/scanner.
func scan(buf []byte) []string {}

// pattern is what the user has typed
func weakMatch(choice, pattern string) float64 {}