diff options
| author | William Boman <william@redwill.se> | 2022-04-12 21:40:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-12 21:40:48 +0200 |
| commit | 343e27838f2923ee782495a90a05dc409abb1c9a (patch) | |
| tree | 7345fe23be48cc349b56a0f28a06e8d69d95a94b /lua | |
| parent | ui: add section about missing servers to help window (diff) | |
| download | mason-343e27838f2923ee782495a90a05dc409abb1c9a.tar mason-343e27838f2923ee782495a90a05dc409abb1c9a.tar.gz mason-343e27838f2923ee782495a90a05dc409abb1c9a.tar.bz2 mason-343e27838f2923ee782495a90a05dc409abb1c9a.tar.lz mason-343e27838f2923ee782495a90a05dc409abb1c9a.tar.xz mason-343e27838f2923ee782495a90a05dc409abb1c9a.tar.zst mason-343e27838f2923ee782495a90a05dc409abb1c9a.zip | |
add clarity_lsp (#594)
Closes #583.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/_generated/filetype_map.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/_generated/metadata.lua | 3 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/_generated/schemas/jsonls.lua | 2 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/servers/clarity_lsp/init.lua | 38 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/servers/init.lua | 1 |
5 files changed, 45 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/_generated/filetype_map.lua b/lua/nvim-lsp-installer/_generated/filetype_map.lua index 66105a3b..6524931f 100644 --- a/lua/nvim-lsp-installer/_generated/filetype_map.lua +++ b/lua/nvim-lsp-installer/_generated/filetype_map.lua @@ -14,6 +14,8 @@ return { blade = { "tailwindcss" }, bsl = { "bsl_ls" }, c = { "ccls", "clangd", "sourcekit" }, + clar = { "clarity_lsp" }, + clarity = { "clarity_lsp" }, clojure = { "clojure_lsp" }, cmake = { "cmake" }, cpp = { "ccls", "clangd", "sourcekit" }, diff --git a/lua/nvim-lsp-installer/_generated/metadata.lua b/lua/nvim-lsp-installer/_generated/metadata.lua index d562e1a3..83b305eb 100644 --- a/lua/nvim-lsp-installer/_generated/metadata.lua +++ b/lua/nvim-lsp-installer/_generated/metadata.lua @@ -34,6 +34,9 @@ return { clangd = { filetypes = { "c", "cpp", "objc", "objcpp" } }, + clarity_lsp = { + filetypes = { "clar", "clarity" } + }, clojure_lsp = { filetypes = { "clojure", "edn" } }, diff --git a/lua/nvim-lsp-installer/_generated/schemas/jsonls.lua b/lua/nvim-lsp-installer/_generated/schemas/jsonls.lua index c98d593e..1bbd6b5d 100644 --- a/lua/nvim-lsp-installer/_generated/schemas/jsonls.lua +++ b/lua/nvim-lsp-installer/_generated/schemas/jsonls.lua @@ -1,3 +1,3 @@ -- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. -- stylua: ignore start -return {id = "json",order = 20,properties = {["json.colorDecorators.enable"] = {default = true,deprecationMessage = "%json.colorDecorators.enable.deprecationMessage%",description = "%json.colorDecorators.enable.desc%",scope = "window",type = "boolean"},["json.format.enable"] = {default = true,description = "%json.format.enable.desc%",scope = "window",type = "boolean"},["json.maxItemsComputed"] = {default = 5000,description = "%json.maxItemsComputed.desc%",type = "number"},["json.schemaDownload.enable"] = {default = true,description = "%json.enableSchemaDownload.desc%",tags = { "usesOnlineServices" },type = "boolean"},["json.schemas"] = {description = "%json.schemas.desc%",items = {default = {fileMatch = { "/myfile" },url = "schemaURL"},properties = {fileMatch = {description = "%json.schemas.fileMatch.desc%",items = {default = "MyFile.json",description = "%json.schemas.fileMatch.item.desc%",type = "string"},minItems = 1,type = "array"},schema = {["$ref"] = "http://json-schema.org/draft-07/schema#",description = "%json.schemas.schema.desc%"},url = {default = "/user.schema.json",description = "%json.schemas.url.desc%",type = "string"}},type = "object"},scope = "resource",type = "array"},["json.trace.server"] = {default = "off",description = "%json.tracing.desc%",enum = { "off", "messages", "verbose" },scope = "window",type = "string"}},title = "JSON",type = "object"}
\ No newline at end of file +return {id = "json",order = 20,properties = {["json.colorDecorators.enable"] = {default = true,deprecationMessage = "%json.colorDecorators.enable.deprecationMessage%",description = "%json.colorDecorators.enable.desc%",scope = "window",type = "boolean"},["json.format.enable"] = {default = true,description = "%json.format.enable.desc%",scope = "window",type = "boolean"},["json.maxItemsComputed"] = {default = 5000,description = "%json.maxItemsComputed.desc%",type = "number"},["json.schemaDownload.enable"] = {default = true,description = "%json.enableSchemaDownload.desc%",tags = { "usesOnlineServices" },type = "boolean"},["json.schemas"] = {description = "%json.schemas.desc%",items = {default = {fileMatch = { "/myfile" },url = "schemaURL"},properties = {fileMatch = {description = "%json.schemas.fileMatch.desc%",items = {default = "MyFile.json",description = "%json.schemas.fileMatch.item.desc%",type = "string"},minItems = 1,type = "array"},schema = {["$ref"] = "http://json-schema.org/draft-07/schema#",description = "%json.schemas.schema.desc%"},url = {default = "/user.schema.json",description = "%json.schemas.url.desc%",type = "string"}},type = "object"},scope = "resource",type = "array"},["json.trace.server"] = {default = "off",description = "%json.tracing.desc%",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["json.validate.enable"] = {default = true,description = "%json.validate.enable.desc%",scope = "window",type = "boolean"}},title = "JSON",type = "object"}
\ No newline at end of file diff --git a/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua b/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua new file mode 100644 index 00000000..9c470790 --- /dev/null +++ b/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua @@ -0,0 +1,38 @@ +local server = require "nvim-lsp-installer.server" +local process = require "nvim-lsp-installer.process" +local platform = require "nvim-lsp-installer.platform" +local std = require "nvim-lsp-installer.installers.std" +local context = require "nvim-lsp-installer.installers.context" +local Data = require "nvim-lsp-installer.data" + +local coalesce, when = Data.coalesce, Data.when + +return function(name, root_dir) + return server.Server:new { + name = name, + root_dir = root_dir, + homepage = "https://github.com/hirosystems/clarity-lsp", + languages = { "clarity" }, + installer = { + context.use_github_release_file( + "hirosystems/clarity-lsp", + coalesce( + when(platform.is_mac, "clarity-lsp-macos-x64.zip"), + when(platform.is_linux and platform.arch == "x64", "clarity-lsp-linux-x64.zip"), + when(platform.is_win and platform.arch == "x64", "clarity-lsp-windows-x64.zip") + ) + ), + context.capture(function(ctx) + return std.unzip_remote(ctx.github_release_file) + end), + context.receipt(function(receipt, ctx) + receipt:with_primary_source(receipt.github_release_file(ctx)) + end), + }, + default_options = { + cmd_env = { + PATH = process.extend_path { root_dir }, + }, + }, + } +end diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua index 7343549b..efca1dd5 100644 --- a/lua/nvim-lsp-installer/servers/init.lua +++ b/lua/nvim-lsp-installer/servers/init.lua @@ -42,6 +42,7 @@ local CORE_SERVERS = Data.set_of { "bsl_ls", "ccls", "clangd", + "clarity_lsp", "clojure_lsp", "cmake", "codeqlls", |
