diff options
| author | William Boman <william@redwill.se> | 2021-04-04 18:37:59 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2021-04-04 18:37:59 +0200 |
| commit | 4fbf2d0b0595f6de4e1debde67bbeeec280b3e89 (patch) | |
| tree | 4a7ae6493876a458024b65005d222182cb1b9f94 /lua/nvim-lsp-installer/installers/lua-ls.lua | |
| parent | update README and change get_installed_servers() return value (#1) (diff) | |
| download | mason-4fbf2d0b0595f6de4e1debde67bbeeec280b3e89.tar mason-4fbf2d0b0595f6de4e1debde67bbeeec280b3e89.tar.gz mason-4fbf2d0b0595f6de4e1debde67bbeeec280b3e89.tar.bz2 mason-4fbf2d0b0595f6de4e1debde67bbeeec280b3e89.tar.lz mason-4fbf2d0b0595f6de4e1debde67bbeeec280b3e89.tar.xz mason-4fbf2d0b0595f6de4e1debde67bbeeec280b3e89.tar.zst mason-4fbf2d0b0595f6de4e1debde67bbeeec280b3e89.zip | |
use same lsp server names as lspconfig
Diffstat (limited to 'lua/nvim-lsp-installer/installers/lua-ls.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/installers/lua-ls.lua | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/lua/nvim-lsp-installer/installers/lua-ls.lua b/lua/nvim-lsp-installer/installers/lua-ls.lua deleted file mode 100644 index 0c2bd08f..00000000 --- a/lua/nvim-lsp-installer/installers/lua-ls.lua +++ /dev/null @@ -1,59 +0,0 @@ -local installer = require('nvim-lsp-installer.installer') -local capabilities = require('nvim-lsp-installer.capabilities') - -local root_dir = installer.get_server_root_path('lua') - -local install_cmd = [=[ -rm -rf lua-language-server; -git clone https://github.com/sumneko/lua-language-server; -cd lua-language-server/; -git submodule update --init --recursive; -cd 3rd/luamake; -if [[ $(uname) == Darwin ]]; then - ninja -f ninja/macos.ninja; -elif [[ $(uname) == Linux ]]; then - ninja -f ninja/linux.ninja; -else - >&2 echo "$(uname) not supported."; - exit 1; -fi -cd ../../; -./3rd/luamake/luamake rebuild; -]=] - -local uname_alias = { - Darwin = 'macOS', -} -local uname = vim.fn.system('uname'):gsub("%s+", "") -local bin_dir = uname_alias[uname] or uname - -return installer.create_lsp_config_installer { - name = "sumneko_lua", - root_dir = root_dir, - install_cmd = install_cmd, - pre_install = function() - if vim.fn.executable('ninja') ~= 1 then - error("ninja not installed (see https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages)") - end - end, - default_options = { - cmd = { root_dir .. "/lua-language-server/bin/" .. bin_dir .. "/lua-language-server" , "-E", root_dir .. "/lua-language-server/main.lua"}, - capabilities = capabilities.create(), - settings = { - Lua = { - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = {'vim'} - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = { - [vim.fn.expand('$VIMRUNTIME/lua')] = true, - [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, - }, - maxPreload = 10000 - } - } - }, - } -} |
