aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/docgen.lua
diff options
context:
space:
mode:
authorJavier Lopez <graulopezjavier@gmail.com>2021-11-30 09:27:12 -0500
committerGitHub <noreply@github.com>2021-11-30 09:27:12 -0500
commitcea6e0b0f6c7daf671b478bd58571768d0385711 (patch)
tree2ad11ab0887274b6e786e3750f2e944308e21989 /scripts/docgen.lua
parentchore: use client.request instead of buf_request (#1503) (diff)
downloadnvim-lspconfig-cea6e0b0f6c7daf671b478bd58571768d0385711.tar
nvim-lspconfig-cea6e0b0f6c7daf671b478bd58571768d0385711.tar.gz
nvim-lspconfig-cea6e0b0f6c7daf671b478bd58571768d0385711.tar.bz2
nvim-lspconfig-cea6e0b0f6c7daf671b478bd58571768d0385711.tar.lz
nvim-lspconfig-cea6e0b0f6c7daf671b478bd58571768d0385711.tar.xz
nvim-lspconfig-cea6e0b0f6c7daf671b478bd58571768d0385711.tar.zst
nvim-lspconfig-cea6e0b0f6c7daf671b478bd58571768d0385711.zip
fix(help): workaround plugin/users overwritting tags (#1512)
Most plugin managers run :helptags in the plugin, which silently overwrites the existing doc/tags. this is an issue for us since lspconfig is manipulating the tags file to point to servers_configurations.md Instead create a markdown comment with the name of the wanted tag and make a copy in the repository of servers_configurations.md to server_configurations.txt. Now when :helptags runs it finds the txt file and generates the appropriate tag. The advantage is this solution should work in all platforms, it also removes lines from docgen CI.
Diffstat (limited to 'scripts/docgen.lua')
-rw-r--r--scripts/docgen.lua23
1 files changed, 1 insertions, 22 deletions
diff --git a/scripts/docgen.lua b/scripts/docgen.lua
index f72b984e..f39beb8f 100644
--- a/scripts/docgen.lua
+++ b/scripts/docgen.lua
@@ -275,27 +275,7 @@ local function generate_readme(template_file, params)
local writer = io.open('doc/server_configurations.md', 'w')
writer:write(readme_data)
writer:close()
-end
-
-local function generate_helptags()
- -- Modify a help tag to point to server_configurations.md and append a modeline to it so it can be
- -- displayed with the right filetype when using :help
- vim.cmd [[
- helptags ./doc
- edit doc/tags
- set noswapfile
- set noreadonly
- call append('$', "lspconfig-server-configurations server_configurations.md /# Configurations")
- silent write
- ]]
- print 'Added doc/server_configurations.md to helptags'
-
- vim.cmd [[
- edit doc/server_configurations.md
- call append('$', "vim:ft=markdown")
- silent write
- ]]
- print 'Added modeline to doc/server_configurations.md'
+ uv.fs_copyfile('doc/server_configurations.md', 'doc/server_configurations.txt')
end
require_all_configs()
@@ -303,4 +283,3 @@ generate_readme('scripts/README_template.md', {
implemented_servers_list = make_implemented_servers_list(),
lsp_server_details = make_lsp_sections(),
})
-generate_helptags()