atmention

package
v2026.609.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPickerResults = 10

Variables

This section is empty.

Functions

func DeleteTagAt

func DeleteTagAt(line []rune, pos int) ([]rune, int, bool)

func DeleteTagForward

func DeleteTagForward(line []rune, pos int) ([]rune, int, bool)

func ExpandLine

func ExpandLine(ctx context.Context, visible, projRoot string, index []Entry) (apiContent string, err error)

func JumpLeftOverTag

func JumpLeftOverTag(line []rune, pos int) int

func JumpRightOverTag

func JumpRightOverTag(line []rune, pos int) int

func ShortTag

func ShortTag(relPath string, all []Entry) string

Types

type AtContext

type AtContext struct {
	Active       bool
	AtStart      int
	QueryStart   int
	Query        string
	ReplaceStart int
}

func AtContextAt

func AtContextAt(line []rune, col int) AtContext

type Entry

type Entry struct {
	RelPath string
	IsDir   bool
}

func BuildIndex

func BuildIndex(ctx context.Context, root string) ([]Entry, error)

func MatchQuery

func MatchQuery(query string, all []Entry, limit int) []Entry

func ResolveTag

func ResolveTag(tag string, all []Entry) (Entry, bool)

type Index

type Index struct {
	Root     string
	Entries  []Entry
	LoadedAt time.Time
}

type IndexCache

type IndexCache struct {
	// contains filtered or unexported fields
}

func NewIndexCache

func NewIndexCache() *IndexCache

func (*IndexCache) Get

func (c *IndexCache) Get(ctx context.Context, projRoot string) ([]Entry, error)

func (*IndexCache) Invalidate

func (c *IndexCache) Invalidate(projRoot string)

type RuneBounds

type RuneBounds struct {
	Start int
	End   int
}

func TagRuneBounds

func TagRuneBounds(line []rune) []RuneBounds

Jump to

Keyboard shortcuts

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