Where Is the xplr Config File?
xplr reads init.lua from the xplr config folder, falling back to etc. Override with the config flag and extend with extra config.
Last updated
xplr configures through one Lua file named init.lua. Lookup order is fixed: an explicit config flag path first, then the user XDG folder, then the global etc file. The first file found wins, and extra snippets layer on with the extra config flag.
Plugins live in a predictable spot too. Cloned plugin repos go under the plugins subfolder of the same config dir, required by name from init.lua. The whole folder is the dotfiles unit to sync. Version pins in the file guard against breaking changes. The book documents every API section with copyable examples.
Where xplr stores this, by platform
/home/<username>/.config/xplr/init.lua
User config in Lua. Declares script version for compatibility checks. Plugins go in the plugins subfolder here.
/etc/xplr/init.lua
System wide fallback when no user file exists. Per machine defaults belong here rather than in home folders.
/Users/<username>/.config/xplr/init.lua
Same XDG layout on Mac. The lookup order and flags work identically across platforms.
Frequently asked questions
How do I start an xplr config?
Create the folder and init.lua, declaring the script version first. The built in defaults load before your file, so you only override what you change.
How do I install xplr plugins?
Clone them into the plugins folder and require them from init.lua. The package manager plugin automates installs from a list.
Notice an outdated path? Let us know.