config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidOption = errors.New("invalid option")
)

Functions

func FormatIntSlice

func FormatIntSlice(values []int) string

func FormatStringSlice

func FormatStringSlice(values []string) string

func LoadRawConfig

func LoadRawConfig(path string) (map[string]any, bool)

LoadRawConfig returns the raw merged TOML map for the given config file path

func LoadRawConfigForDir

func LoadRawConfigForDir(dir string) (map[string]any, bool)

LoadRawConfigForDir returns user config merged with dir's trusted workspace config

func LoadRawConfigForWorkspace

func LoadRawConfigForWorkspace(
	global, workspace, dir string,
) (map[string]any, bool)

func ParseBool

func ParseBool(value string) (bool, error)

func ParseIntSlice

func ParseIntSlice(value string) ([]int, error)

func ParseNonNegInt

func ParseNonNegInt(value string) (int, error)

func ParsePositiveInt

func ParsePositiveInt(value string) (int, error)

func ParseStringLiteral

func ParseStringLiteral(value string) (string, error)

func ParseStringSlice

func ParseStringSlice(value string) ([]string, error)

Types

type AutoSave

type AutoSave struct {
	FocusLost  *bool              `toml:"focus-lost"`
	AfterDelay AutoSaveAfterDelay `toml:"after-delay"`
}

func (*AutoSave) UnmarshalTOML

func (a *AutoSave) UnmarshalTOML(value any) error

type AutoSaveAfterDelay

type AutoSaveAfterDelay struct {
	Enable  *bool `toml:"enable"`
	Timeout *int  `toml:"timeout"`
}

type EditorConfig

type EditorConfig struct {
	IndentStyle            *core.IndentStyle
	TabWidth               *int
	LineEnding             *core.LineEnding
	TrimTrailingWhitespace *bool
	InsertFinalNewline     *bool
	MaxLineLength          *int
}

func FindEditorConfig

func FindEditorConfig(file string) *EditorConfig
type Search struct {
	SmartCase  *bool `toml:"smart-case"`
	WrapAround *bool `toml:"wrap-around"`
}

Jump to

Keyboard shortcuts

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