Open twiclo opened 8 months ago
I had started writing a message on how to work around this but lost it. Anyway I have plans to make this possible via the standard way of lib.mkBefore / lib.mkAfter but it needs some patches that are in nixpkgs' staging-next branch. Till then you can use https://github.com/nix-community/home-manager/pull/2391 or add a fake plugin with your config probably.
My workaround so far has been to put the leader setting at the top of the first loaded file.
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.
* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
There's still no option to add vim or lua lines before the plugin configs.
Followed @twiclo's advice and declared a dummy plugin at the beginning of my plugin list
programs.neovim.plugins = [
# Null plugin, just sets leader keys
# Must be on top so it's the first thing written to init.vim
{
plugin = pkgs.stdenv.mkDerivation {
name = "vim-plugin-set-leader-keys-to-space";
src = ./empty;
installPhase = ''
cp -r $src $out
'';
};
config = ''
let g:mapleader = ' '
let g:maplocalleader = ' '
'';
}
# actual plugins...
];
Are you following the right branch?
Is there an existing issue for this?
Issue description
Here is a segment of my home.nix
The first line of
set.lua
isvim.g.mapleader = " "
Here is my telescope.luaThe print works, the file is getting loaded in. If I comment out that mapleader set then my leader key bindings work. If I start neovim and run
verbose map <leader>g
it says no mapping is found. I'm pretty sure that theextraLuaConfig
block is being added AFTER the plugin configs. I also tried creating anvim/init.lua
and putting the leader map in there with no luckMaintainer CC
No response
System information