aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorVu Le Thanh <thanhvule0310@gmail.com>2022-07-25 22:47:39 +0700
committerGitHub <noreply@github.com>2022-07-25 17:47:39 +0200
commitf438dfff48f952521d1fc9c78ea269a10c27d02e (patch)
treed5a6030f53e4b50067f0c882a760463d3c09c534 /lua
parentfix: rename cmake-format to cmakelang (#139) (diff)
downloadmason-f438dfff48f952521d1fc9c78ea269a10c27d02e.tar
mason-f438dfff48f952521d1fc9c78ea269a10c27d02e.tar.gz
mason-f438dfff48f952521d1fc9c78ea269a10c27d02e.tar.bz2
mason-f438dfff48f952521d1fc9c78ea269a10c27d02e.tar.lz
mason-f438dfff48f952521d1fc9c78ea269a10c27d02e.tar.xz
mason-f438dfff48f952521d1fc9c78ea269a10c27d02e.tar.zst
mason-f438dfff48f952521d1fc9c78ea269a10c27d02e.zip
feat: add sql-formatter (#140)
Diffstat (limited to 'lua')
-rw-r--r--lua/mason-registry/index.lua1
-rw-r--r--lua/mason-registry/sql-formatter/init.lua11
-rw-r--r--lua/mason-schemas/lsp/rescript-lsp.lua2
-rw-r--r--lua/mason/mappings/language.lua2
4 files changed, 14 insertions, 2 deletions
diff --git a/lua/mason-registry/index.lua b/lua/mason-registry/index.lua
index ddfcbed9..93ec8d85 100644
--- a/lua/mason-registry/index.lua
+++ b/lua/mason-registry/index.lua
@@ -137,6 +137,7 @@ return {
solidity = "mason-registry.solidity",
sorbet = "mason-registry.sorbet",
sourcery = "mason-registry.sourcery",
+ ["sql-formatter"] = "mason-registry.sql-formatter",
sqlls = "mason-registry.sqlls",
sqls = "mason-registry.sqls",
staticcheck = "mason-registry.staticcheck",
diff --git a/lua/mason-registry/sql-formatter/init.lua b/lua/mason-registry/sql-formatter/init.lua
new file mode 100644
index 00000000..c3bcf10f
--- /dev/null
+++ b/lua/mason-registry/sql-formatter/init.lua
@@ -0,0 +1,11 @@
+local Pkg = require "mason-core.package"
+local npm = require "mason-core.managers.npm"
+
+return Pkg.new {
+ name = "sql-formatter",
+ desc = [[A whitespace formatter for different query languages]],
+ homepage = "https://sql-formatter-org.github.io/sql-formatter/",
+ languages = { Pkg.Lang.SQL },
+ categories = { Pkg.Cat.Formatter },
+ install = npm.packages { "sql-formatter", bin = { "sql-formatter" } },
+}
diff --git a/lua/mason-schemas/lsp/rescript-lsp.lua b/lua/mason-schemas/lsp/rescript-lsp.lua
index 3bc2fc22..1bd5dad7 100644
--- a/lua/mason-schemas/lsp/rescript-lsp.lua
+++ b/lua/mason-schemas/lsp/rescript-lsp.lua
@@ -1,3 +1,3 @@
-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY.
-- stylua: ignore start
-return {properties = {["rescript.settings.askToStartBuild"] = {default = true,description = "Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running.",scope = "language-overridable",type = "boolean"},["rescript.settings.autoRunCodeAnalysis"] = {default = false,description = "Automatically start ReScript's code analysis.",type = "boolean"},["rescript.settings.binaryPath"] = {default = vim.NIL,description = "Path to the directory where ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.",type = { "string", "null" }},["rescript.settings.inlayHints.enable"] = {default = false,description = "Enable (experimental) inlay hints.",type = "boolean"},["rescript.settings.inlayHints.maxLength"] = {default = 25,markdownDescription = "Maximum length of character for inlay hints. Set to null to have an unlimited length. Inlay hints that exceed the maximum length will not be shown.",minimum = 0,type = { "null", "integer" }}},title = "ReScript",type = "object"} \ No newline at end of file
+return {properties = {["rescript.settings.askToStartBuild"] = {default = true,description = "Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running.",scope = "language-overridable",type = "boolean"},["rescript.settings.autoRunCodeAnalysis"] = {default = false,description = "Automatically start ReScript's code analysis.",type = "boolean"},["rescript.settings.binaryPath"] = {default = vim.NIL,description = "Path to the directory where ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.",type = { "string", "null" }},["rescript.settings.codeLens.enable"] = {default = false,description = "Enable (experimental) code lens for function definitions.",type = "boolean"},["rescript.settings.inlayHints.enable"] = {default = false,description = "Enable (experimental) inlay hints.",type = "boolean"},["rescript.settings.inlayHints.maxLength"] = {default = 25,markdownDescription = "Maximum length of character for inlay hints. Set to null to have an unlimited length. Inlay hints that exceed the maximum length will not be shown.",minimum = 0,type = { "null", "integer" }}},title = "ReScript",type = "object"} \ No newline at end of file
diff --git a/lua/mason/mappings/language.lua b/lua/mason/mappings/language.lua
index 14bde3b6..be57ee31 100644
--- a/lua/mason/mappings/language.lua
+++ b/lua/mason/mappings/language.lua
@@ -90,7 +90,7 @@ return {
slint = { "slint-lsp" },
solidity = { "solang", "solidity" },
sphinx = { "esbonio" },
- sql = { "sqlls", "sqls" },
+ sql = { "sql-formatter", "sqlls", "sqls" },
stylelint = { "stylelint-lsp" },
svelte = { "svelte-language-server" },
systemverilog = { "svlangserver", "svls", "verible" },