Closed bileamScheuvens closed 1 month ago
I think that to get those paths properly expanded, you indeed need to call some lua code. Can you try something like:
config.opts.undodir.__raw = "vim.fs.normalize('~/undodir')";
Easy to work around with lua or nix
builtins.getEnv "HOME"
, but IMO unintuitive behavior.
If the alternative behaviour is to automatically transform option definitions when detecting ~
or $HOME
in the string, this is even less intuitive IMO.
When I configure a nixvim option, I expect the init.lua
file to have a lua-equivialent of whatever nix value I defined; without any arbitrary transformations being done without me knowing.
Good point, also wasn't aware that the behavior is just how neovim handles paths, went vim -> nixvim. Thanks, I'll close
n/a
unstable
Description
Setting the undodir option creates the directory locally, even if it begins with '\~' or '$HOME'. It interprets it literally and creates the structure .../'\~'/undodir/. Easy to work around with lua or nix
builtins.getEnv "HOME"
, but IMO unintuitive behavior.Minimal, Reproducible Example (MRE)