snippet

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snippet

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

Snippet holds the parsed data structure of the snippet format defined in LSP protocol:

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax

Usually this is used along with auto-completion.

func NewSnippet

func NewSnippet(content string) *Snippet

func (*Snippet) Parse

func (s *Snippet) Parse() error

func (*Snippet) Raw

func (s *Snippet) Raw() string

func (*Snippet) TabStopAt

func (s *Snippet) TabStopAt(idx int) *TabStop

func (*Snippet) TabStopOff

func (s *Snippet) TabStopOff(idx int) (int, int)

func (*Snippet) TabStopSize

func (s *Snippet) TabStopSize() int

func (*Snippet) TabStops

func (s *Snippet) TabStops() []*TabStop

func (*Snippet) Template

func (s *Snippet) Template() string

type TabStop

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

TabStop is the tabstop defined in LSP protocol:

func (TabStop) IsFinal

func (ts TabStop) IsFinal() bool

func (TabStop) String

func (sc TabStop) String() string

Jump to

Keyboard shortcuts

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