diff options
| author | ecmma <48774736+ecmma@users.noreply.github.com> | 2021-05-15 23:17:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-15 23:17:49 +0200 |
| commit | c054e36125968c26b855c1a78c933521a2fc2fa2 (patch) | |
| tree | a3dadf248bbd3a33532f52c1cf79c8e869e1c7a7 /lua | |
| parent | LICENSE is not markdown (diff) | |
| download | mason-c054e36125968c26b855c1a78c933521a2fc2fa2.tar mason-c054e36125968c26b855c1a78c933521a2fc2fa2.tar.gz mason-c054e36125968c26b855c1a78c933521a2fc2fa2.tar.bz2 mason-c054e36125968c26b855c1a78c933521a2fc2fa2.tar.lz mason-c054e36125968c26b855c1a78c933521a2fc2fa2.tar.xz mason-c054e36125968c26b855c1a78c933521a2fc2fa2.tar.zst mason-c054e36125968c26b855c1a78c933521a2fc2fa2.zip | |
add texlab (#12)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/server.lua | 1 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/servers/texlab.lua | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/server.lua b/lua/nvim-lsp-installer/server.lua index f68e510b..00ed42da 100644 --- a/lua/nvim-lsp-installer/server.lua +++ b/lua/nvim-lsp-installer/server.lua @@ -14,6 +14,7 @@ local _SERVERS = { "jsonls", "solargraph", "sumneko_lua", + "texlab", "tsserver", "vimls", "vuels", diff --git a/lua/nvim-lsp-installer/servers/texlab.lua b/lua/nvim-lsp-installer/servers/texlab.lua new file mode 100644 index 00000000..1b93db1e --- /dev/null +++ b/lua/nvim-lsp-installer/servers/texlab.lua @@ -0,0 +1,33 @@ +local server = require('nvim-lsp-installer.server') + +local root_dir = server.get_server_root_path('latex') + +local install_cmd = [=[ +if [[ $(uname) == Linux ]]; then + wget -O texlab.tar.gz https://github.com/latex-lsp/texlab/releases/download/v2.2.2/texlab-x86_64-linux.tar.gz +elif [[ $(uname) == Darwin ]]; then + wget -O texlab.tar.gz https://github.com/latex-lsp/texlab/releases/download/v2.2.2/texlab-x86_64-macos.tar.gz +else + >&2 echo "$(uname) not supported."; + exit 1; +fi + +tar xf texlab.tar.gz + +]=] + +return server.Server:new { + name = "texlab", + root_dir = root_dir, + install_cmd = install_cmd, + 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 = {root_dir .. '/texlab'}, + } +} |
