docs: move editorconfig.txt into plugins.txt

It helps to have plugins living in one common area, because it signals
to users the mechanisms for controlling them, which are typically driven
by keymaps and autocmds rather than builtin options.

We can always revisit if plugins.txt gets "too big" (for example, we may
want to introduce "project.txt" for the project concept, where
editorconfig and 'exrc' are relevant), but for now it's rather unusual
for editorconfig.txt to have its own dedicated helpfile.
This commit is contained in:
Justin M. Keyes
2025-09-11 23:37:51 -04:00
parent db67607201
commit a30a947593
4 changed files with 100 additions and 117 deletions

View File

@@ -89,10 +89,11 @@ local new_layout = {
-- Map of new:old pages, to redirect renamed pages.
local redirects = {
['api-ui-events'] = 'ui',
['credits'] = 'backers',
['plugins'] = 'editorconfig',
['terminal'] = 'nvim_terminal_emulator',
['tui'] = 'term',
['api-ui-events'] = 'ui',
}
-- TODO: These known invalid |links| require an update to the relevant docs.

View File

@@ -384,25 +384,6 @@ local config = {
return 'treesitter-' .. name:lower()
end,
},
editorconfig = {
filename = 'editorconfig.txt',
files = {
'runtime/lua/editorconfig.lua',
},
section_order = {
'editorconfig.lua',
},
section_fmt = function(_name)
return 'EditorConfig integration'
end,
helptag_fmt = function(name)
return name:lower()
end,
fn_xform = function(fun)
fun.table = true
fun.name = vim.split(fun.name, '.', { plain = true })[2]
end,
},
health = {
filename = 'health.txt',
files = {
@@ -432,11 +413,20 @@ local config = {
plugins = {
filename = 'plugins.txt',
section_order = {
'editorconfig.lua',
'tohtml.lua',
},
files = {
'runtime/lua/editorconfig.lua',
'runtime/lua/tohtml.lua',
},
fn_xform = function(fun)
if fun.module == 'editorconfig' then
-- Example: "editorconfig.properties.root()" => "editorconfig.root"
fun.table = true
fun.name = vim.split(fun.name, '.', { plain = true })[2] or fun.name
end
end,
section_fmt = function(name)
return 'Builtin plugin: ' .. name:lower()
end,