Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MunifTanjim/exrc.nvim
Secure Project Local Config for Neovim
https://github.com/MunifTanjim/exrc.nvim
neovim neovim-plugin
Last synced: 7 days ago
JSON representation
Secure Project Local Config for Neovim
- Host: GitHub
- URL: https://github.com/MunifTanjim/exrc.nvim
- Owner: MunifTanjim
- License: mit
- Archived: true
- Created: 2021-08-28T13:52:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-28T07:55:47.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T16:50:03.244Z (3 months ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage: https://muniftanjim.dev/blog/neovim-project-local-config-with-exrc-nvim/
- Size: 20.5 KB
- Stars: 56
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **Warning**
>
> Neovim v0.9.0 onwards supports secure `.exrc`, `.nvimrc` and `.nvim.lua` files. You don't need this plugin anymore.
>
> Just enable the `'exrc'` option:
>
> ```lua
> vim.o.exrc = true
> ```
>
> For more information, check:
> - `:help 'exrc'`
> - `:help exrc`# exrc.nvim
Local config file with confirmation for Neovim.
## Installation
Install the plugin with your preferred plugin manager. For example, with [`vim-plug`](https://github.com/junegunn/vim-plug):
```vim
Plug 'MunifTanjim/exrc.nvim'
```It's recommended to also install [`nui.nvim`](https://github.com/MunifTanjim/nui.nvim) for a better UX:
```vim
Plug 'MunifTanjim/nui.nvim'
```## Setup
`exrc.nvim` needs to be initialized with the `require("exrc").setup()` function.
For example:
```lua
-- disable built-in local config file support
vim.o.exrc = falserequire("exrc").setup({
files = {
".nvimrc.lua",
".nvimrc",
".exrc.lua",
".exrc",
},
})
```## Commands
### `ExrcSource`
Re-source exrc file:
```vim
:ExrcSource
```Reset state and re-source exrc file:
```vim
:ExrcSource!
```## Similar Projects
- [`ii14/exrc.vim`](https://github.com/ii14/exrc.vim)
- [`jenterkin/vim-autosource`](https://github.com/jenterkin/vim-autosource)
- [`krisajenkins/vim-projectlocal`](https://github.com/krisajenkins/vim-projectlocal)
- [`LucHermitte/local_vimrc`](https://github.com/LucHermitte/local_vimrc)
- [`windwp/nvim-projectconfig`](https://github.com/windwp/nvim-projectconfig)## License
Licensed under the MIT License. Check the [LICENSE](./LICENSE) file for details.