snippet

package
v0.0.0-...-5f0b271 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 9 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
}

func (Snippet) Expand

func (sn Snippet) Expand() string

func (Snippet) Matches

func (sn Snippet) Matches(prefix string) bool

func (Snippet) Trigger

func (sn Snippet) Trigger() string

type SnippetManager

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

func Load

func Load(l *log.Logger, configdir string) (*SnippetManager, error)

Load snippets from file system and add to the snippet manager.

func NewSnippetManager

func NewSnippetManager(l *log.Logger) *SnippetManager

func (*SnippetManager) AddConfig

func (m *SnippetManager) AddConfig(bs []byte) error

func (*SnippetManager) AddFiletypeSnippets

func (m *SnippetManager) AddFiletypeSnippets(filetype string, content []byte) error

func (*SnippetManager) AddGlobalSnippets

func (m *SnippetManager) AddGlobalSnippets(content []byte) error

func (*SnippetManager) Search

func (m *SnippetManager) Search(uri string, prefix string) []Snippet

Jump to

Keyboard shortcuts

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