diff options
| author | William Boman <william@redwill.se> | 2023-04-15 23:32:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-15 21:32:10 +0000 |
| commit | 390f1635b383d2cedd6ebe626c39ff9385885e78 (patch) | |
| tree | dff5a6be32c692afa5b718b4e7e211dbe69e3fb5 /lua | |
| parent | chore: autogenerate (#1216) (diff) | |
| download | mason-390f1635b383d2cedd6ebe626c39ff9385885e78.tar mason-390f1635b383d2cedd6ebe626c39ff9385885e78.tar.gz mason-390f1635b383d2cedd6ebe626c39ff9385885e78.tar.bz2 mason-390f1635b383d2cedd6ebe626c39ff9385885e78.tar.lz mason-390f1635b383d2cedd6ebe626c39ff9385885e78.tar.xz mason-390f1635b383d2cedd6ebe626c39ff9385885e78.tar.zst mason-390f1635b383d2cedd6ebe626c39ff9385885e78.zip | |
chore: migrate julia-lsp (#1217)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/mason-registry/index/init.lua | 1 | ||||
| -rw-r--r-- | lua/mason-registry/index/julia-lsp/init.lua | 86 |
2 files changed, 0 insertions, 87 deletions
diff --git a/lua/mason-registry/index/init.lua b/lua/mason-registry/index/init.lua index 67ebace8..b6bfa826 100644 --- a/lua/mason-registry/index/init.lua +++ b/lua/mason-registry/index/init.lua @@ -2,7 +2,6 @@ -- stylua: ignore start return { ["haskell-language-server"] = "mason-registry.index.haskell-language-server", - ["julia-lsp"] = "mason-registry.index.julia-lsp", ["r-languageserver"] = "mason-registry.index.r-languageserver", verible = "mason-registry.index.verible" }
\ No newline at end of file diff --git a/lua/mason-registry/index/julia-lsp/init.lua b/lua/mason-registry/index/julia-lsp/init.lua deleted file mode 100644 index b8175a2a..00000000 --- a/lua/mason-registry/index/julia-lsp/init.lua +++ /dev/null @@ -1,86 +0,0 @@ -local Pkg = require "mason-core.package" -local github = require "mason-core.managers.github" -local path = require "mason-core.path" -local platform = require "mason-core.platform" -local std = require "mason-core.managers.std" - -local server_script = [[ -if VERSION < v"1.0.0" - error("julia language server only works with julia 1.0.0+") -end - -import Pkg -version_specific_env_path = joinpath(@__DIR__, "scripts", "environments", "languageserver", "v$(VERSION.major).$(VERSION.minor)") -if isdir(version_specific_env_path) - Pkg.activate(version_specific_env_path) -else - Pkg.activate(joinpath(@__DIR__, "scripts", "environments", "languageserver", "fallback")) -end - -using LanguageServer, SymbolServer, Pkg - -OLD_DEPOT_PATH = ARGS[1] -ENV_PATH = ARGS[2] - -runserver( - stdin, - stdout, - ENV_PATH, - OLD_DEPOT_PATH, - nothing, - ENV["SYMBOLSTORE_PATH"] -) -]] - -return Pkg.new { - name = "julia-lsp", - desc = [[An implementation of the Microsoft Language Server Protocol for the Julia language.]], - homepage = "https://github.com/julia-vscode/LanguageServer.jl", - languages = { Pkg.Lang.Julia }, - categories = { Pkg.Cat.LSP }, - ---@async - ---@param ctx InstallContext - install = function(ctx) - std.ensure_executable("julia", { help_url = "https://julialang.org/downloads/" }) - - ctx.fs:mkdir "vscode-package" - ctx:chdir("vscode-package", function() - github - .unzip_release_file({ - repo = "julia-vscode/julia-vscode", - asset_file = function(version) - local version_number = version:gsub("^v", "") - return ("language-julia-%s.vsix"):format(version_number) - end, - }) - .with_receipt() - end) - - ctx.fs:rename( - path.concat { - "vscode-package", - "extension", - "scripts", - }, - "scripts" - ) - ctx.fs:rmrf "vscode-package" - - ctx.fs:write_file("nvim-lsp.jl", server_script) - ctx:link_bin( - "julia-lsp", - ctx:write_shell_exec_wrapper( - "julia-lsp", - ("julia --startup-file=no --history-file=no --depwarn=no %q"):format(path.concat { - ctx.package:get_install_path(), - "nvim-lsp.jl", - }), - { - SYMBOLSTORE_PATH = path.concat { ctx.package:get_install_path(), "symbolstorev5" }, - JULIA_DEPOT_PATH = path.concat { ctx.package:get_install_path(), "lsdepot" }, - JULIA_LOAD_PATH = platform.is.win and ";" or ":", - } - ) - ) - end, -} |
