1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

treewide(docs): use literalLua instead of __raw in option examples

This commit is contained in:
Axel Karjalainen 2025-10-04 22:38:00 +03:00 committed by Gaétan Lepage
parent 5aae2b9fcd
commit 5ddfbdf1c2
23 changed files with 54 additions and 57 deletions

View file

@ -3,7 +3,12 @@
...
}:
let
inherit (lib.nixvim) defaultNullOpts mkNullOrOption mkNullOrStrLuaFnOr;
inherit (lib.nixvim)
defaultNullOpts
mkNullOrOption
mkNullOrStrLuaFnOr
literalLua
;
inherit (lib) types;
in
lib.nixvim.plugins.mkNeovimPlugin {
@ -23,9 +28,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
];
in
{
compile_path = defaultNullOpts.mkStr {
__raw = "vim.fn.stdpath 'cache' .. '/catppuccin'";
} "Set the compile cache directory.";
compile_path = defaultNullOpts.mkStr (literalLua "vim.fn.stdpath 'cache' .. '/catppuccin'") "Set the compile cache directory.";
flavour = mkNullOrOption (types.enum (flavours ++ [ "auto" ])) ''
Theme flavour.

View file

@ -3,7 +3,7 @@
...
}:
let
inherit (lib.nixvim) defaultNullOpts mkNullOrOption;
inherit (lib.nixvim) defaultNullOpts mkNullOrOption literalLua;
inherit (lib) types;
in
lib.nixvim.plugins.mkNeovimPlugin {
@ -34,7 +34,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
settingsOptions = {
options = {
compile_path = defaultNullOpts.mkStr { __raw = "vim.fn.stdpath('cache') .. '/nightfox'"; } ''
compile_path = defaultNullOpts.mkStr (literalLua "vim.fn.stdpath('cache') .. '/nightfox'") ''
The output directory path where the compiled results will be written to.
'';

View file

@ -98,9 +98,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
Whether to enable caching.
'';
cache_dir = defaultNullOpts.mkStr {
__raw = "vim.fn.stdpath('cache') .. '/palette'";
} "Cache directory.";
cache_dir = defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.fn.stdpath('cache') .. '/palette'") "Cache directory.";
};
settingsExample = { };