feat(exrc): stop searching in parent directories by unsetting 'exrc'

Problem:
No way for a user to limit 'exrc' search in parent directories (compare
editorconfig.root).

Solution:
A configuration file can unset 'exrc', disabling the search for its
parent directories.
This commit is contained in:
Yochem van Rosmalen
2025-05-19 16:18:03 +02:00
parent dc6fc11b87
commit 8d397fa458
6 changed files with 46 additions and 29 deletions

View File

@@ -2749,6 +2749,9 @@ local options = {
directories (ordered upwards), if the files are in the |trust| list.
Use |:trust| to manage trusted files. See also |vim.secure.read()|.
Unset 'exrc' to stop further searching of 'exrc' files in parent
directories, similar to |editorconfig.root|.
Compare 'exrc' to |editorconfig|:
- 'exrc' can execute any code; editorconfig only specifies settings.
- 'exrc' is Nvim-specific; editorconfig works in other editors.