diff options
| author | Yochem van Rosmalen <git@yochem.nl> | 2025-05-11 18:00:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-11 11:00:51 -0500 |
| commit | 23bf4c0531acef4e8252f4db13fcd90ad5aa91bf (patch) | |
| tree | 2f9319b75ee959eb872fc8f06964a3b1f2b5c502 /src/nvim/options.lua | |
| parent | 2c07428966a74c76003e00e2a37bf98eb8802c93 (diff) | |
| download | rneovim-23bf4c0531acef4e8252f4db13fcd90ad5aa91bf.tar.gz rneovim-23bf4c0531acef4e8252f4db13fcd90ad5aa91bf.tar.bz2 rneovim-23bf4c0531acef4e8252f4db13fcd90ad5aa91bf.zip | |
feat(exrc): search in parent directories (#33889)
feat(exrc): search exrc in parent directories
Problem:
`.nvim.lua` is only loaded from current directory, which is not flexible
when working from a subfolder of the project.
Solution:
Also search parent directories for configuration file.
Diffstat (limited to 'src/nvim/options.lua')
| -rw-r--r-- | src/nvim/options.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 6b206e0445..8e5b374938 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -2745,9 +2745,9 @@ local options = { defaults = false, desc = [=[ Enables project-local configuration. Nvim will execute any .nvim.lua, - .nvimrc, or .exrc file found in the |current-directory|, if the file is - in the |trust| list. Use |:trust| to manage trusted files. See also - |vim.secure.read()|. + .nvimrc, or .exrc file found in the |current-directory| and all parent + directories (ordered upwards), if the files are in the |trust| list. + Use |:trust| to manage trusted files. See also |vim.secure.read()|. Compare 'exrc' to |editorconfig|: - 'exrc' can execute any code; editorconfig only specifies settings. @@ -2765,7 +2765,7 @@ local options = { full_name = 'exrc', scope = { 'global' }, secure = true, - short_desc = N_('read .nvimrc and .exrc in the current directory'), + short_desc = N_('read project-local configuration in parent directories'), tags = { 'project-config', 'workspace-config' }, type = 'boolean', varname = 'p_exrc', |