summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/editorconfig.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-12-08 01:39:41 -0500
committerJustin M. Keyes <justinkz@gmail.com>2025-12-15 13:55:15 -0500
commit31dfecb458308cd07770af596b4aa36f44ff7d08 (patch)
tree24fd4b4eca3e60186bd77b7b25f7d542d3657c4d /runtime/lua/editorconfig.lua
parent8165427b4d92e55be5644bdf9270eb49b99d6dcc (diff)
docs: misc, editorconfig
fix https://github.com/neovim/neovim/issues/36858
Diffstat (limited to 'runtime/lua/editorconfig.lua')
-rw-r--r--runtime/lua/editorconfig.lua25
1 files changed, 20 insertions, 5 deletions
diff --git a/runtime/lua/editorconfig.lua b/runtime/lua/editorconfig.lua
index 725608b21e..12a1548ee7 100644
--- a/runtime/lua/editorconfig.lua
+++ b/runtime/lua/editorconfig.lua
@@ -1,9 +1,24 @@
--- @brief
---- Nvim supports EditorConfig. When a file is opened, after running |ftplugin|s
---- and |FileType| autocommands, Nvim searches all parent directories of that file
---- for ".editorconfig" files, parses them, and applies any properties that match
---- the opened file. Think of it like 'modeline' for an entire (recursive)
---- directory. For more information see https://editorconfig.org/.
+--- EditorConfig is like 'modeline' for an entire (recursive) directory. When a file is opened,
+--- after running |ftplugin|s and |FileType| autocommands, the EditorConfig feature searches all
+--- parent directories of that file for `.editorconfig` files, parses them, and applies their
+--- properties. For more information see https://editorconfig.org/.
+---
+--- Example `.editorconfig` file:
+--- ```ini
+--- root = true
+---
+--- [*]
+--- charset = utf-8
+--- end_of_line = lf
+--- indent_size = 4
+--- indent_style = space
+--- max_line_length = 42
+--- trim_trailing_whitespace = true
+---
+--- [*.{diff,md}]
+--- trim_trailing_whitespace = false
+--- ```
--- @brief [g:editorconfig]() [b:editorconfig]()
---