aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/ccls/common.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-12 19:53:30 +0200
committerGitHub <noreply@github.com>2022-07-12 17:53:30 +0000
commit20b192ffd9cf81f94ed6c23973ecbd7ddc69d695 (patch)
treeae616df1adcb90ef6c4894c1d289bdf52134eb5b /lua/mason-registry/ccls/common.lua
parentfix(jdtls)!: remove lspconfig settings override (#58) (diff)
downloadmason-20b192ffd9cf81f94ed6c23973ecbd7ddc69d695.tar
mason-20b192ffd9cf81f94ed6c23973ecbd7ddc69d695.tar.gz
mason-20b192ffd9cf81f94ed6c23973ecbd7ddc69d695.tar.bz2
mason-20b192ffd9cf81f94ed6c23973ecbd7ddc69d695.tar.lz
mason-20b192ffd9cf81f94ed6c23973ecbd7ddc69d695.tar.xz
mason-20b192ffd9cf81f94ed6c23973ecbd7ddc69d695.tar.zst
mason-20b192ffd9cf81f94ed6c23973ecbd7ddc69d695.zip
chore!: remove ccls (#59)
This is a package that doesn't see frequent releases and it's been a mess to get to build across platforms. Installing via the system default package manager provides a much better experience atm.
Diffstat (limited to 'lua/mason-registry/ccls/common.lua')
-rw-r--r--lua/mason-registry/ccls/common.lua47
1 files changed, 0 insertions, 47 deletions
diff --git a/lua/mason-registry/ccls/common.lua b/lua/mason-registry/ccls/common.lua
deleted file mode 100644
index 7393a0b5..00000000
--- a/lua/mason-registry/ccls/common.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-local path = require "mason-core.path"
-local platform = require "mason-core.platform"
-local installer = require "mason-core.installer"
-local git = require "mason-core.managers.git"
-local github = require "mason-core.managers.github"
-local Optional = require "mason-core.optional"
-
----@async
----@param opts {llvm_dir: string}
-return function(opts)
- local ctx = installer.context()
- local clang_resource_dir = path.concat { ctx.package:get_install_path(), "clang-resource" }
- local install_prefix = ctx.cwd:get()
-
- local source = github.tag { repo = "MaskRay/ccls" }
- source.with_receipt()
-
- ctx.fs:mkdir "ccls-git"
- ctx:chdir("ccls-git", function()
- git.clone { "https://github.com/MaskRay/ccls", recursive = true, version = Optional.of(source.tag) }
- ctx.spawn.cmake {
- "-DCMAKE_BUILD_TYPE=Release",
- "-DUSE_SYSTEM_RAPIDJSON=OFF",
- "-DCMAKE_FIND_FRAMEWORK=LAST",
- "-Wno-dev",
- ("-DCMAKE_INSTALL_PREFIX=%s"):format(install_prefix),
- Optional.of_nilable(opts.llvm_dir)
- :map(function(llvm_dir)
- return {
- ("-DCMAKE_PREFIX_PATH=%s"):format(llvm_dir),
- -- On Mac we use Homebrew LLVM which will persist after installation.
- -- On Linux, and when a custom llvm_dir is provided, its clang resource dir will be the only
- -- artifact persisted after installation, as the locally installed llvm installation will be
- -- cleaned up after compilation.
- not platform.is_mac and ("-DCLANG_RESOURCE_DIR=%s"):format(clang_resource_dir) or vim.NIL,
- }
- end)
- :or_else(vim.NIL),
- platform.is_mac and "-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" or vim.NIL,
- }
-
- ctx.spawn.make { "install" }
- end)
- ctx.fs:rmrf "ccls-git"
-
- ctx:link_bin("ccls", path.concat { "bin", "ccls" })
-end