diff options
| author | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-15 17:26:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-15 17:26:22 -0800 |
| commit | 5686a90890105e6271307e86b472f729af1cc4f8 (patch) | |
| tree | 7d691ac0e7ea2feb58c5862dd52a1c8bfbef6fb4 /scripts/docgen.lua | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.gz nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.bz2 nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.lz nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.xz nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.zst nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.zip | |
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
Diffstat (limited to 'scripts/docgen.lua')
| -rw-r--r-- | scripts/docgen.lua | 14 |
1 files changed, 11 insertions, 3 deletions
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 = ([[ |
