A simple plugin to automatically source your local neovim configuration file.
With lazy.nvim
: add the following to your require("lazy").setup({})
{ "012e/nvimrc", config = {}, },
If you didn't specify config = {}
, add require("012e/nvimrc").setup()
somewhere in your config file.
- Default configuration:
require("nvimrc").setup({
-- The file name pattern to search for
pattern = ".nvimrc",
})
- If your current directory is in in a git repo:
- If file
.nvimrc
is found at the git root, the following command is ransource /your/git/root/.nvimrc
. - If file
.nvimrc.lua
is found at the git root, the following command is ranluafile /your/git/root/.nvimrc.lua
.
- If file
- Else the plugin checks your current directory and do the exact same thing.