snippetslab

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SnippetTitle        = "com.renfei.SnippetsLab.Key.SnippetTitle"
	SnippetParts        = "com.renfei.SnippetsLab.Key.SnippetParts"
	SnippetPartContent  = "com.renfei.SnippetsLab.Key.SnippetPartContent"
	SnippetPartLanguage = "com.renfei.SnippetsLab.Key.SnippetPartLanguage"
	SnippetUUID         = "com.renfei.SnippetsLab.Key.SnippetUUID"
	SnippetTagUUIDs     = "com.renfei.SnippetsLab.Key.SnippetTagUUIDs"

	SnippetTagsTagUUID  = "com.renfei.SnippetsLab.Key.TagUUID"
	SnippetTagsTagTitle = "com.renfei.SnippetsLab.Key.TagTitle"
)

Variables

View Source
var Key = model.ManagerKey("snippetslab")

Functions

func Description

func Description(config *Config) model.ManagerDescription

Types

type Config

type Config struct {
	Enabled     bool     `yaml:"enabled" head_comment:"Set to true if you want to use SnippetsLab."`
	LibraryPath string   `` /* 153-byte string literal not displayed */
	IncludeTags []string `` /* 132-byte string literal not displayed */
}

func AutoDiscoveryConfig

func AutoDiscoveryConfig(system *system.System) *Config

type Manager

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

func NewManager

func NewManager(options ...Option) (*Manager, error)

func (*Manager) GetSnippets

func (m *Manager) GetSnippets() []model.Snippet

func (Manager) Info

func (m Manager) Info() []model.InfoLine

func (Manager) Key added in v1.1.0

func (m Manager) Key() model.ManagerKey

func (*Manager) Sync added in v1.1.0

func (m *Manager) Sync(model.SyncEventChannel)

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures a Manager.

func WithConfig

func WithConfig(config Config) Option

func WithSystem

func WithSystem(system *system.System) Option

WithSystem sets the utils.System instance to be used by Manager.

Jump to

Keyboard shortcuts

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