-
-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract config root from cwd instead of using scriptnames
Breaking Change
- Loading branch information
Showing
1 changed file
with
5 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So any use of multiple configs of neovim using
nvim -u /path/to/config1.vim
ornvim -u /path/to/config2.vim
(not necessarily minimal configs, just 2 different ones, my main one could be one of them) will do what exactly?What will stop working?
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I've never seen this usage of
-u
, though @leiserfg tried to warn me, so that's on me 😬We need the config-root for resolving
./
inpaths
passed to loaders.If it's really necessary, we can probably figure out some way to still get accurate config-directories.
(not trying to diminish your point, just interested: What can multiple configs be used for?)
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have this usage currently but I'm considering it for my dev setup on NixOS, where I'd like:
nvim -u /path/to/old-configs/init.vim
~/.config/nvim
nvim -u /path/to/generated/config.vim
)(I'm still thinking about uses, but that's the things I'm seeing as 'could be useful' 😃 )
note that I'm not impacted by the change for now, so take your time with fixing this if you want
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still a way to do it, but it's a bit more verbose:
env MYVIMRC=/tmp/config/init.lua nvim -u $MYVIMRC
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would work yeah, too bad there isn't a better way (or is there?)
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only other way is to parse the args, that was my original pr.
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points 👍
I think setting
$MYVIMRC
manually is the correct approach as this directly makes up for nvim not setting$MYVIMRC
when it's sourced via-u
(which is a bit unexpected, but there's probably some reason for this not happening (or bug 🤷))0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not initializing
$MYVIMRC
is intentional and documented, but I have no idea about the source of the intention.0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, ofc, my mind went to "that's a bug in the specification", but that doesn't make much sense xD
0585c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some friend of Bram Moolenaar is using it to heat his home.