diff options
| author | William Boman <william@redwill.se> | 2022-04-06 00:25:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-06 00:25:50 +0200 |
| commit | 999476c324b26223aaf409a84497215e18d74499 (patch) | |
| tree | 323cc5b072471e5e78ee94b273157779bbcb9611 /lua/nvim-lsp-installer/servers/ansiblels/init.lua | |
| parent | fix(taplo): use crate distribution (#576) (diff) | |
| download | mason-999476c324b26223aaf409a84497215e18d74499.tar mason-999476c324b26223aaf409a84497215e18d74499.tar.gz mason-999476c324b26223aaf409a84497215e18d74499.tar.bz2 mason-999476c324b26223aaf409a84497215e18d74499.tar.lz mason-999476c324b26223aaf409a84497215e18d74499.tar.xz mason-999476c324b26223aaf409a84497215e18d74499.tar.zst mason-999476c324b26223aaf409a84497215e18d74499.zip | |
switch majority of installers to async implementation (#574)
Diffstat (limited to 'lua/nvim-lsp-installer/servers/ansiblels/init.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/ansiblels/init.lua | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lua/nvim-lsp-installer/servers/ansiblels/init.lua b/lua/nvim-lsp-installer/servers/ansiblels/init.lua index 2ee54b65..92541e56 100644 --- a/lua/nvim-lsp-installer/servers/ansiblels/init.lua +++ b/lua/nvim-lsp-installer/servers/ansiblels/init.lua @@ -1,8 +1,8 @@ local server = require "nvim-lsp-installer.server" local path = require "nvim-lsp-installer.path" -local std = require "nvim-lsp-installer.installers.std" -local npm = require "nvim-lsp-installer.installers.npm" -local context = require "nvim-lsp-installer.installers.context" +local npm = require "nvim-lsp-installer.core.managers.npm" +local git = require "nvim-lsp-installer.core.managers.git" +local installer = require "nvim-lsp-installer.core.installer" return function(name, root_dir) return server.Server:new { @@ -10,14 +10,13 @@ return function(name, root_dir) root_dir = root_dir, languages = { "ansible" }, homepage = "https://github.com/ansible/ansible-language-server", - installer = { - std.git_clone "https://github.com/ansible/ansible-language-server", - npm.install { "npm@latest" }, -- ansiblels has quite a strict npm version requirement - npm.exec(npm.npm_command, { "install" }), - npm.run "compile", - context.receipt(function(receipt) - receipt:with_primary_source(receipt.git_remote "https://github.com/ansible/ansible-language-server") - end), + async = true, + installer = installer.serial { + git.clone { "https://github.com/ansible/ansible-language-server" }, + -- ansiblels has quite a strict npm version requirement. + -- Install dependencies using the the latest npm version. + npm.exec { "npm@latest", "install" }, + npm.run { "compile" }, }, default_options = { cmd = { "node", path.concat { root_dir, "out", "server", "src", "server.js" }, "--stdio" }, |
