From 5686a90890105e6271307e86b472f729af1cc4f8 Mon Sep 17 00:00:00 2001 From: Ashkan Kiani Date: Fri, 15 Nov 2019 17:26:22 -0800 Subject: Redo installation. (#17) * Redo installation. Servers which want to be auto installed should specify skeleton[name].install() and it will be automatically added to the list of installable servers. - Add :LspInstall and :LspInstallInfo - Auto generate docs for servers with .install() available. - Add util.npm_installer - Refactor utf8 capabilities common config into a single function - Add contribution notes. - Also expose util.base_install_dir for other installers potentially - Fix tsserver's arguments and add javascript filetypes --- scripts/docgen.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/docgen.lua b/scripts/docgen.lua index 7acc8bb5..d58c5881 100644 --- a/scripts/docgen.lua +++ b/scripts/docgen.lua @@ -88,9 +88,17 @@ for _, k in ipairs(skeleton_keys) do end params.preamble = "" if tconf.docs then - params.preamble = table.concat(filter( - nilifempty(tconf.docs.description) - ), '\n\n') + local installation_instructions + if v.install then + installation_instructions = string.format("Can be installed in neovim with `:LspInstall %s`", k) + end + local preamble_parts = filter( + nilifempty(tconf.docs.description) + , installation_instructions + ) + -- Insert a newline after the preamble if it exists. + if #preamble_parts > 0 then table.insert(preamble_parts, '') end + params.preamble = table.concat(preamble_parts, '\n') end local section = ([[ -- cgit v1.2.3-70-g09d2