vidar: github.com/nelsam/vidar/setting Index | Files | Directories

package setting

import "github.com/nelsam/vidar/setting"

Index

Package Files

default_project.go keybindings.go paths_default.go plugins.go settings.go

Constants

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

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,
    }
)
var (
    DefaultProject = Project{
        Name:   "*default*",
        Path:   "/",
        Gopath: os.Getenv("GOPATH"),
    }
)

func AddProject Uses

func AddProject(project Project)

func Bindings Uses

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

func Plugins Uses

func Plugins() []string

func PrefFont Uses

func PrefFont(d gxui.Driver) gxui.Font

PrefFont returns the most preferred font found on the system.

func SetDefaultBindings Uses

func SetDefaultBindings(cmds ...bind.Command)

type Font Uses

type Font struct {
    Name string
    Size int
}

type Project Uses

type Project struct {
    Name   string
    Path   string
    Gopath string
}

func Projects Uses

func Projects() (projs []Project)

func (Project) Environ Uses

func (p Project) Environ() []string

func (Project) LicenseHeader Uses

func (p Project) LicenseHeader() string

func (Project) String Uses

func (p Project) String() string

Directories

PathSynopsis
config

Package setting imports 16 packages (graph) and is imported by 12 packages. Updated 2019-08-30. Refresh now. Tools for package owners.