config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_TABSIZE   = 4
	DEFAULT_TABSPACES = true
)

Variables

View Source
var CONFFILES = getConfigFiles()
View Source
var IGNOREDIRS = map[string]bool{
	".git":         true,
	"node_modules": true,
	"__pycache__":  true,
	".cache":       true,
}
View Source
var MAXFILES = 50_000
View Source
var STYLE_DEFAULT = tcell.StyleDefault
View Source
var WARNFILESZ = int64(10_485_760)
View Source
var WORD_DELIMS = " \t=&|,./(){}[]#+*%'-:?!'\""

Functions

func GetIgnoreDirsFlat

func GetIgnoreDirsFlat() string

func HandleConfigFile

func HandleConfigFile()

func ParseConfig added in v0.1.1

func ParseConfig(fn string, c map[string]tinyini.Section)

func SetConfigFile

func SetConfigFile(fn string)

func SetIgnoreDirs

func SetIgnoreDirs(rawdirs string)

Types

type EditorConfig

type EditorConfig struct {
	TabSize           int
	TabSpaces         bool
	SaveHook          []string
	HighlightPatterns []HighlightPattern
	HighlightKeywords []HighlightKeyword
}

func GetEditorConfig

func GetEditorConfig(fpath string) *EditorConfig

type HighlightKeyword

type HighlightKeyword struct {
	Keyword string
	Style   tcell.Style
}

type HighlightPattern

type HighlightPattern struct {
	Priority, Left, Right int
	Pattern               string
	Style                 tcell.Style
}

Jump to

Keyboard shortcuts

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