aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2023-01-07 08:20:37 -0700
committerGitHub <noreply@github.com>2023-01-07 08:20:37 -0700
commit363633844903331ae1d6383de2fef329db08b5e3 (patch)
tree6f6ab3d711c26a8d91c7bf51ddc16027cec9d7b0 /runtime/doc
parent42afa0369a3c01dddd1efef1397bbf46011f391b (diff)
parent6ffa434f0b1c6e82fb6c1445d5d7382e0ef22e07 (diff)
downloadrneovim-363633844903331ae1d6383de2fef329db08b5e3.tar.gz
rneovim-363633844903331ae1d6383de2fef329db08b5e3.tar.bz2
rneovim-363633844903331ae1d6383de2fef329db08b5e3.zip
Merge pull request #21649 from gpanders/editorconfig-enable
feat(editorconfig): allow editorconfig to be toggled dynamically
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/editorconfig.txt14
-rw-r--r--runtime/doc/news.txt2
2 files changed, 9 insertions, 7 deletions
diff --git a/runtime/doc/editorconfig.txt b/runtime/doc/editorconfig.txt
index e93713e5ff..04a057e5ff 100644
--- a/runtime/doc/editorconfig.txt
+++ b/runtime/doc/editorconfig.txt
@@ -13,16 +13,18 @@ the opened file are applied.
For more information on EditorConfig, see https://editorconfig.org/.
- *g:editorconfig_enable*
-EditorConfig integration can be disabled by adding >lua
+ *g:editorconfig* *b:editorconfig*
+EditorConfig integration can be disabled globally by adding >lua
- vim.g.editorconfig_enable = false
+ vim.g.editorconfig = false
<
-to the user's |init.lua| file (or the Vimscript equivalent to |init.vim|).
+to the user's |init.lua| file (or the Vimscript equivalent to |init.vim|). It
+can also be disabled per-buffer by setting the |b:editorconfig| buffer-local
+variable to `false`.
- *b:editorconfig*
When Nvim finds a valid .editorconfig file it will store the applied
-properties in the buffer variable |b:editorconfig|.
+properties in the buffer variable |b:editorconfig| if it was not already set to
+`false` by the user.
*editorconfig-properties*
The following properties are supported by default:
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 3e291e59c9..33ac9ddd20 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -53,7 +53,7 @@ The following new APIs or features were added.
• EditorConfig support is now builtin. This is enabled by default and happens
automatically. To disable it, users should add >lua
- vim.g.editorconfig_enable = false
+ vim.g.editorconfig = false
<
(or the Vimscript equivalent) to their |config| file.