setting

package
v0.0.0-...-bbcbdef Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Unlicense Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LicenseHeaderFilename is the file name to look for in projects.
	//
	// TODO: this belongs in the license header plugin, since not all
	// languages need it.
	LicenseHeaderFilename = ".license-header"

	// DefaultFontSize is the font size that will be used if no font
	// size settings are found in the config files.
	DefaultFontSize = 12
)

Variables

View Source
var (
	// App is an XDG application config.  It's exported so that plugins can load their own config
	// files from vidar's config directories.
	//
	// TODO: we should unexport this and provide functions to access its methods.  Allowing plugins
	// to assign to App is misleading and potentially dangerous.
	App = xdg.New("", "vidar")

	// BuiltinFonts is a list of the fonts that we have built in to the
	// editor.  This is done so that vidar will always be able to start,
	// even if none of the fonts on a user's system are parseable.
	BuiltinFonts = map[string][]byte{
		"gomono":           gomono.TTF,
		"gomonobold":       gomonobold.TTF,
		"gomonoitalic":     gomonoitalic.TTF,
		"gomonobolditalic": gomonobolditalic.TTF,
	}
)
View Source
var (
	DefaultProject = Project{
		Name:   "*default*",
		Path:   "/",
		Gopath: os.Getenv("GOPATH"),
	}
)

Functions

func AddProject

func AddProject(project Project)

func Bindings

func Bindings(commandName string) (events []gxui.KeyboardEvent)

func Plugins

func Plugins() []string

func PrefFont

func PrefFont(d gxui.Driver) gxui.Font

PrefFont returns the most preferred font found on the system.

func SetDefaultBindings

func SetDefaultBindings(cmds ...bind.Command)

Types

type Font

type Font struct {
	Name string
	Size int
}

type Project

type Project struct {
	Name string
	Path string
	Env  map[string]string

	// Gopath is deprecated.  It is now merged into Env.
	// It's kept here for migration purposes.
	Gopath string `toml:",omitempty" json:",omitempty" yaml:",omitempty`
}

func Projects

func Projects() (projs []Project)

func (Project) Environ

func (p Project) Environ() []string

func (Project) LicenseHeader

func (p Project) LicenseHeader() string

func (Project) String

func (p Project) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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