From 23bf4c0531acef4e8252f4db13fcd90ad5aa91bf Mon Sep 17 00:00:00 2001 From: Yochem van Rosmalen Date: Sun, 11 May 2025 18:00:51 +0200 Subject: 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. --- runtime/lua/vim/_meta/options.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index c6b9d7a875..79035d420d 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -2076,9 +2076,9 @@ vim.bo.expandtab = vim.o.expandtab vim.bo.et = vim.bo.expandtab --- 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. -- cgit v1.3-3-g829e