aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/nimls/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-04-11 17:19:01 +0200
committerGitHub <noreply@github.com>2022-04-11 17:19:01 +0200
commit88f590ce0e01767bcc8dfdc862a456efde77d4a0 (patch)
tree2f5faaffa76b9147a873b2adc3286b6624144976 /lua/nvim-lsp-installer/servers/nimls/init.lua
parentfix(verible): use correct unpacked directory name on Windows (#589) (diff)
downloadmason-88f590ce0e01767bcc8dfdc862a456efde77d4a0.tar
mason-88f590ce0e01767bcc8dfdc862a456efde77d4a0.tar.gz
mason-88f590ce0e01767bcc8dfdc862a456efde77d4a0.tar.bz2
mason-88f590ce0e01767bcc8dfdc862a456efde77d4a0.tar.lz
mason-88f590ce0e01767bcc8dfdc862a456efde77d4a0.tar.xz
mason-88f590ce0e01767bcc8dfdc862a456efde77d4a0.tar.zst
mason-88f590ce0e01767bcc8dfdc862a456efde77d4a0.zip
more async refactor (#587)
Diffstat (limited to 'lua/nvim-lsp-installer/servers/nimls/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/nimls/init.lua23
1 files changed, 7 insertions, 16 deletions
diff --git a/lua/nvim-lsp-installer/servers/nimls/init.lua b/lua/nvim-lsp-installer/servers/nimls/init.lua
index b554f1d8..e92a891a 100644
--- a/lua/nvim-lsp-installer/servers/nimls/init.lua
+++ b/lua/nvim-lsp-installer/servers/nimls/init.lua
@@ -1,8 +1,6 @@
local server = require "nvim-lsp-installer.server"
-local std = require "nvim-lsp-installer.installers.std"
local process = require "nvim-lsp-installer.process"
-local path = require "nvim-lsp-installer.path"
-local context = require "nvim-lsp-installer.installers.context"
+local git = require "nvim-lsp-installer.core.managers.git"
return function(name, root_dir)
return server.Server:new {
@@ -10,19 +8,12 @@ return function(name, root_dir)
root_dir = root_dir,
homepage = "https://github.com/PMunch/nimlsp",
languages = { "nim" },
- installer = {
- std.git_clone "https://github.com/PMunch/nimlsp.git",
- function(_, callback, ctx)
- process.spawn("nimble", {
- args = { "build", "-y", "--localdeps" },
- cwd = ctx.install_dir,
- stdio_sink = ctx.stdio_sink,
- }, callback)
- end,
- context.receipt(function(receipt)
- receipt:with_primary_source(receipt.git_remote "https://github.com/PMunch/nimlsp.git")
- end),
- },
+ async = true,
+ ---@param ctx InstallContext
+ installer = function(ctx)
+ git.clone({ "https://github.com/PMunch/nimlsp.git" }).with_receipt()
+ ctx.spawn.nimble { "build", "-y", "--localdeps" }
+ end,
default_options = {
cmd_env = {
PATH = process.extend_path { root_dir },