While loading of directory local configuration files is possible via the exrc
option, it does not allow to do so only for whitelisted directories. Any .exrc
file will be sourced. Thats a security concern.
This plugin loads .exrc
files, if the current working directory (cwd) contains one and the cwd is whitelisted.
Plug 'LhKipp/nvim-project-rc'
Don't forget to call setup 😏
require('project-rc').setup{}
(Default values are shown)
require('project-rc').setup{
config_file_name = ".nvimrc.lua", -- Note it is not ".exrc" or ".nvimrc" by default
projects = { -- The directories in which sourcing a local config file is allowed
-- "/home/user/repos/my_project"
}
}