diff options
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/init.lua | 1 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/servers/mm0_ls/init.lua | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua index fddeac66..7343549b 100644 --- a/lua/nvim-lsp-installer/servers/init.lua +++ b/lua/nvim-lsp-installer/servers/init.lua @@ -86,6 +86,7 @@ local CORE_SERVERS = Data.set_of { "lelwel_ls", "lemminx", "ltex", + "mm0_ls", "nickel_ls", "nimls", "ocamlls", diff --git a/lua/nvim-lsp-installer/servers/mm0_ls/init.lua b/lua/nvim-lsp-installer/servers/mm0_ls/init.lua new file mode 100644 index 00000000..14ec1bc9 --- /dev/null +++ b/lua/nvim-lsp-installer/servers/mm0_ls/init.lua @@ -0,0 +1,33 @@ +local server = require "nvim-lsp-installer.server" +local std = require "nvim-lsp-installer.installers.std" +local context = require "nvim-lsp-installer.installers.context" +local path = require "nvim-lsp-installer.path" +local process = require "nvim-lsp-installer.process" + +return function(name, root_dir) + return server.Server:new { + name = name, + root_dir = root_dir, + languages = { "metamath-zero" }, + homepage = "https://github.com/digama0/mm0", + installer = { + std.git_clone "https://github.com/digama0/mm0", + ---@type ServerInstallerFunction + function(_, callback, ctx) + process.spawn("cargo", { + args = { "build", "--release" }, + cwd = path.concat { ctx.install_dir, "mm0-rs" }, + stdio_sink = ctx.stdio_sink, + }, callback) + end, + context.receipt(function(receipt) + receipt:with_primary_source(receipt.git_remote "https://github.com/digama0/mm0") + end), + }, + default_options = { + cmd_env = { + PATH = process.extend_path { path.concat { root_dir, "mm0-rs", "target", "release" } }, + }, + }, + } +end |
