diff options
| author | William Boman <william@redwill.se> | 2021-05-17 14:37:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-17 14:37:13 +0200 |
| commit | ae93866358777fcf6766152dd55980c4778f4c59 (patch) | |
| tree | a1b36ba2e2aa09688c4cb96b645b03c34b728042 /lua/nvim-lsp-installer/servers/texlab/init.lua | |
| parent | remove :LspInstallAll (diff) | |
| download | mason-ae93866358777fcf6766152dd55980c4778f4c59.tar mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.gz mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.bz2 mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.lz mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.xz mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.zst mason-ae93866358777fcf6766152dd55980c4778f4c59.zip | |
add support for zx install scripts (#13)
Diffstat (limited to 'lua/nvim-lsp-installer/servers/texlab/init.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/texlab/init.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/texlab/init.lua b/lua/nvim-lsp-installer/servers/texlab/init.lua new file mode 100644 index 00000000..02bb3a3e --- /dev/null +++ b/lua/nvim-lsp-installer/servers/texlab/init.lua @@ -0,0 +1,21 @@ +local server = require('nvim-lsp-installer.server') +local path = require("nvim-lsp-installer.path") +local zx = require("nvim-lsp-installer.installers.zx") + +local root_dir = server.get_server_root_path('latex') + +return server.Server:new { + name = "texlab", + root_dir = root_dir, + install_cmd = zx.file("./install.mjs"), + pre_install_check = function () + if vim.fn.executable("wget") ~=1 then + error("Missing wget. Please, refer to https://www.gnu.org/software/wget/ to install it.") + elseif vim.fn.executable("pdflatex") ~=1 then + error("The program pdflatex wasn't found. Please install a TeX distribution: https://www.latex-project.org/get/#tex-distributions") + end + end, + default_options = { + cmd = { path.concat { root_dir, "texlab" } }, + } +} |
