aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-01-24 20:10:54 +0100
committerGitHub <noreply@github.com>2022-01-24 20:10:54 +0100
commit40f533260581794a19e6f9c87fbcb434ea4e36f6 (patch)
tree097c86a93a27b4a668734e1f84a80f5ae93d0ec4 /lua/nvim-lsp-installer/servers
parentfix(beancount): fix rename on windows, also remove debug print (diff)
downloadmason-40f533260581794a19e6f9c87fbcb434ea4e36f6.tar
mason-40f533260581794a19e6f9c87fbcb434ea4e36f6.tar.gz
mason-40f533260581794a19e6f9c87fbcb434ea4e36f6.tar.bz2
mason-40f533260581794a19e6f9c87fbcb434ea4e36f6.tar.lz
mason-40f533260581794a19e6f9c87fbcb434ea4e36f6.tar.xz
mason-40f533260581794a19e6f9c87fbcb434ea4e36f6.tar.zst
mason-40f533260581794a19e6f9c87fbcb434ea4e36f6.zip
add bsl_ls (#446)
На здоровье!
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
-rw-r--r--lua/nvim-lsp-installer/servers/bsl_ls/init.lua35
-rw-r--r--lua/nvim-lsp-installer/servers/init.lua1
2 files changed, 36 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/bsl_ls/init.lua b/lua/nvim-lsp-installer/servers/bsl_ls/init.lua
new file mode 100644
index 00000000..9036ea7d
--- /dev/null
+++ b/lua/nvim-lsp-installer/servers/bsl_ls/init.lua
@@ -0,0 +1,35 @@
+local server = require "nvim-lsp-installer.server"
+local path = require "nvim-lsp-installer.path"
+local std = require "nvim-lsp-installer.installers.std"
+local context = require "nvim-lsp-installer.installers.context"
+
+return function(name, root_dir)
+ return server.Server:new {
+ name = name,
+ root_dir = root_dir,
+ homepage = "https://1c-syntax.github.io/bsl-language-server",
+ languages = { "onescript" },
+ installer = {
+ std.ensure_executables {
+ { "java", "java was not found in path." },
+ },
+ context.use_github_release_file("1c-syntax/bsl-language-server", function(tag)
+ local version = tag:gsub("^v", "")
+ return ("bsl-language-server-%s-exec.jar"):format(version)
+ end),
+ context.capture(function(ctx)
+ return std.download_file(ctx.github_release_file, "bsl-lsp.jar")
+ end),
+ context.receipt(function(receipt, ctx)
+ receipt:with_primary_source(receipt.github_release_file(ctx))
+ end),
+ },
+ default_options = {
+ cmd = {
+ "java",
+ "-jar",
+ path.concat { root_dir, "bsl-lsp.jar" },
+ },
+ },
+ }
+end
diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua
index 7ce1ea7a..63a83ce6 100644
--- a/lua/nvim-lsp-installer/servers/init.lua
+++ b/lua/nvim-lsp-installer/servers/init.lua
@@ -39,6 +39,7 @@ local CORE_SERVERS = Data.set_of {
"bashls",
"beancount",
"bicep",
+ "bsl_ls",
"ccls",
"clangd",
"clojure_lsp",