Configuration Variables
GLOW_CONFIG_HOME
Specifies the directory where Glow looks for its configuration file.Override the default config directory. Glow will look for
glow.yml in this directory.$GLOW_CONFIG_HOME/glow.yml(highest priority)$XDG_CONFIG_HOME/glow/glow.yml- Platform-specific config directory (lowest priority)
main.go:438-440
XDG_CONFIG_HOME
Standard XDG Base Directory specification for config files.If set, Glow looks for configuration at
$XDG_CONFIG_HOME/glow/glow.yml. This follows the XDG Base Directory specification.main.go:434-436
GLOW_CONFIG_HOME takes precedence over XDG_CONFIG_HOME. If both are set, Glow uses GLOW_CONFIG_HOME.Display Variables
PAGER
Specifies the pager program to use when the--pager flag is enabled.
Command to use for paging output. The command is split on spaces to extract the program and arguments.
main.go:317-329
EDITOR
Specifies the text editor for theglow config command.
Editor command used when running
glow config. Falls back to system defaults if not set (typically vi or nano).config_cmd.go:40-43
Rendering Variables
GLAMOUR_STYLE
Specifies the default Glamour rendering style for TUI mode.Default style for rendering markdown in TUI mode. Can be a built-in style name or path to a JSON style file.
ui/config.go:10
Development and Debugging Variables
GLOW_HIGH_PERFORMANCE_PAGER
Enables high-performance paging mode in the TUI.When set to
true, enables optimized rendering performance in the TUI pager. This is primarily for debugging.ui/config.go:18
GLOW_ENABLE_GLAMOUR
Controls whether Glamour rendering is enabled.When set to
false, disables Glamour rendering. This is primarily used for debugging and testing.ui/config.go:19
System Variables
HOME
User’s home directory, used for path resolution.Home directory for the current user. Used when resolving
~ in paths and locating default config directories.ui/config.go:8
GOPATH
Go workspace directory, tracked by the TUI.Go workspace path. The TUI uses this to provide better navigation in Go projects.
ui/config.go:7
Configuration Precedence
When multiple configuration sources are available, Glow uses this precedence order:- Command-line flags (highest priority)
- Environment variables
- Configuration file (
glow.yml) - Built-in defaults (lowest priority)
Complete Example
Here’s a comprehensive example showing how to configure Glow using environment variables:Persistent Configuration
To make environment variables permanent, add them to your shell profile:Troubleshooting
Config File Not Found
If Glow can’t find your config file, verify the search paths:Editor Not Opening
Ifglow config doesn’t open an editor: