package style

Import Path
	github.com/carapace-sh/carapace/pkg/style (on go.dev)

Dependency Relation
	imports 4 packages, and imported by 11 packages

Involved Source Files config.go keyword.go loglevel.go path.go Package style provide display coloring
Package-Level Type Names (only one)
/* sort by: | */
( Context) Abs(s string) (string, error) ( Context) Getenv(key string) string ( Context) LookupEnv(key string) (string, bool) github.com/carapace-sh/carapace/pkg/traverse.Context (interface) github.com/carapace-sh/carapace/pkg/uid.Context (interface) github.com/carapace-sh/carapace.Context Context : github.com/carapace-sh/carapace/pkg/traverse.Context Context : github.com/carapace-sh/carapace/pkg/uid.Context func ForExtension(path string, sc Context) string func ForKeyword(s string, _ Context) string func ForLogLevel(s string, _ Context) string func ForPath(path string, sc Context) string func ForPathExt(path string, sc Context) string
Package-Level Functions (total 12)
ForExtension returns the style for given extension json
ForKeyword returns the style for given keyword.
ForLogLevel returns the style for given log level.
ForPath returns the style for given path /tmp/locally/reachable/file.txt
ForPath returns the style for given path by extension only /tmp/non/existing/file.txt
Of combines different styles.
func Parse(s string) ui.Style
Register a style configuration var Carapace = struct { Value string `description:"default style for values"` Description string `description:"default style for descriptions"` }{ Value: Default, Description: Gray, } func init() { Register("carapace", &Carapace) }
Set a style Set("carapace.Value", "bold magenta")
SGR returns the SGR sequence for given style.
TrueColor returns a 24-bit true color.
XTerm256Color returns a color from the xterm 256-color palette.