templates

package
v1.3.2-0...-63f4cff Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 2 Imported by: 0

README

Creating / Modifying Theme Templates

Reference the following table when creating or modifying theme templates:

Value Description Auto Generated?
{{ .Background }} The theme's primary background hex color
{{ .BackgroundAlt1 }} A 5% lighter* version of {{ .Background }}
{{ .BackgroundAlt2 }} A 10% lighter* version of {{ .Background }}
{{ .Foreground }} The theme's primary foreground hex color
{{ .ForegroundAlt }} A 10% darker* version of {{ .Foreground }}
{{ .Function }} The hex color used for functions and methods
{{ .Constant }} The hex color used for constant values
{{ .Keyword }} The hex color used for keywords (if, struct, etc)
{{ .Comment }} The hex color used for comments
{{ .Number }} The hex color used for numeric values
{{ .String }} The hex color used for string values
{{ .Type }} The hex color used for data types (int, float64, etc)
{{ .Name }} The theme name (may include spaces, punctuation, etc)
{{ .ID }} A sanitized version of the theme name
{{ .Author }} The user provided author name (can be empty)
{{ .DarkOrLight }} light for light themes, dark for dark themes

* - This assumes the theme is a dark syntax theme. For light syntax themes, the X% lighter colors would be darker, and the X% darker colors would be lighter.

Note: All hex color values can be suffixed with X256 to get the XTerm 256 color value (for example: {{ .BackgroundX256}} or {{ .FunctionX256 }}).

Documentation

Index

Constants

View Source
const SublimeTemplate = `` /* 8535-byte string literal not displayed */
View Source
const VSCodeTemplate = `` /* 11939-byte string literal not displayed */
View Source
const VimTemplate = `` /* 5823-byte string literal not displayed */

Variables

This section is empty.

Functions

func GetSublimeThemeFileName

func GetSublimeThemeFileName(name string) string

func GetSublimeThemeTemplate

func GetSublimeThemeTemplate() (*template.Template, error)

func GetVSCodeThemeFileName

func GetVSCodeThemeFileName(name string) string

func GetVSCodeThemeTemplate

func GetVSCodeThemeTemplate() (*template.Template, error)

func GetVimThemeFileName

func GetVimThemeFileName(name string) string

func GetVimThemeTemplate

func GetVimThemeTemplate() (*template.Template, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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