wrapper/options: fix exmple for additionalRuntimePaths

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696484c57a2dd2dcd985ddeba37859e10ff7
This commit is contained in:
raf 2025-08-05 12:50:47 +03:00
commit 085df81edf
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -33,32 +33,33 @@ in {
default = []; default = [];
example = literalExpression '' example = literalExpression ''
[ [
# absolute path, as a string - impure # Absolute path, as a string. This is the impure option.
"$HOME/.config/nvim-extra" "$HOME/.config/nvim-extra"
# relative path, as a path - pure # Relative path inside your configurationn. If your config
# is version controlled, then this is pure and reproducible.
./nvim ./nvim
# source type path - pure and reproducible # Source type path. This pure and reproducible.
(builtins.source { # See `:doc builtins.path` inside a Nix repl for more options.
path = ./runtime; (builtins.path {
name = "nvim-runtime"; path = ./runtime; # this must be a relative path
name = "nvim-runtime"; # name is arbitrary
}) })
] ]
''; '';
description = '' description = ''
Additional runtime paths that will be appended to the Additional runtime paths that will be appended to the active
active runtimepath of the Neovim. This can be used to runtimepath of the Neovim. This can be used to add additional
add additional lookup paths for configs, plugins, spell lookup paths for configs, plugins, spell languages and other
languages and other things you would generally place in things you would generally place in your {file}`$HOME/.config/nvim`.
your {file}`$HOME/.config/nvim`.
This is meant as a declarative alternative to throwing This is meant as a declarative alternative to throwing files into
files into {file}`~/.config/nvim` and having the Neovim {file}`~/.config/nvim` and having the Neovim wrapper pick them up.
wrapper pick them up. For more details on
`vim.o.runtimepath`, and what paths to use; please see For more details on `vim.o.runtimepath`, and what paths to use, please see
[the official documentation](https://neovim.io/doc/user/options.html#'runtimepath') [the official documentation](https://neovim.io/doc/user/options.html#'runtimepath').
''; '';
}; };
@ -67,13 +68,13 @@ in {
default = []; default = [];
example = literalExpression '' example = literalExpression ''
[ [
# absolute path, as a string - impure # Absolute path, as a string - impure
"$HOME/.config/nvim/my-lua-file.lua" "$HOME/.config/nvim/my-lua-file.lua"
# relative path, as a path - pure # Relative path, as a path - pure
./nvim/my-lua-file.lua ./nvim/my-lua-file.lua
# source type path - pure and reproducible # Source type path - pure and reproducible
(builtins.path { (builtins.path {
path = ./nvim/my-lua-file.lua; path = ./nvim/my-lua-file.lua;
name = "my-lua-file"; name = "my-lua-file";
@ -82,9 +83,10 @@ in {
''; '';
description = '' description = ''
Additional lua files that will be sourced by Neovim. Additional Lua files that will be sourced by Neovim.
Takes both absolute and relative paths, all of which
will be called via the `luafile` command in Neovim. Takes both absolute and relative paths, all of which will be called
via the `luafile` command in Neovim.
See [lua-commands](https://neovim.io/doc/user/lua.html#lua-commands) See [lua-commands](https://neovim.io/doc/user/lua.html#lua-commands)
on the Neovim documentation for more details. on the Neovim documentation for more details.