Define variable per project.
This plugin allows for the execution of vimscript, this could result in the execution of malicious code. To remediate that we only source files the user marks as trusted using the SHA256 of the file to track if it has been changed.
This plugins requires plenary.nvim, you can install everything with packer.nvim:
use {
"martini97/project-config.nvim",
requires = {"nvim-lua/plenary.nvim"},
}
Checks if a config file exists for the current cwd and if signature matches the cached on, and asks for permission to source if it changed, if it's the same then it will source the config.
Create or edit the config file for the current cwd.
Remove the config file from the current cwd from trusted files.
Path to the file where we will store the trust database, defaults to
stdpatch('cache')/project_config/cache.json
Wrapper for require('project_config').edit_config()
.
Wrapper for require('project_config').untrust_config()
.
This project defines some mappings that the user can plug to their config.
Wrapper for require('project_config').edit_config()
.
nmap <space>. <plug>ProjectConfigEdit
Wrapper for require('project_config').untrust_config()
.
nmap <space>! <plug>ProjectConfigUntrust
- Implement trusted files
- Write tests
- Save config files on data dir
- Command to edit/create config file
- [-] Preview file before execution
- Allow user to distrust a file permanently
- Write docs (
:h project_config
) - Use
:inputlist()
instead of confirm