summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua2
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua42
2 files changed, 36 insertions, 8 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua
index ab7099a..7d4fb9e 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua
@@ -19,6 +19,8 @@ return {
-- librewolf = "sqlite://" .. home .. "/.librewolf/si.default/places.sqlite",
mysql = "mariadb://ms:password@localhost:5432/mysql",
postsql = "postgresql://ps:password@localhost:5432/postgresql",
+ dts = "postgresql://dts:dujinDTS2@localhost:5432/evcp",
+ dts_aws = "postgresql://dts:dujinDTS2@127.0.0.1:15432/evcp",
-- qutebrowser = "sqlite://" .. home .. "/.local/share/qutebrowser/history.sqlite",
-- sqlite = "sqlite://" .. home .. "/.local/share/db/sqlite.db",
}
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
index 8beb058..da49976 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
@@ -84,7 +84,11 @@ return {
},
})
- require("mason").setup()
+ require("mason").setup({
+ pip = {
+ use_python3_host_prog = true,
+ },
+ })
require("mason-lspconfig").setup({
ensure_installed = {
"bashls",
@@ -94,12 +98,13 @@ return {
"jdtls",
"jsonls",
"lua_ls",
- "mutt_ls",
+ -- "mutt_ls",
"pyright",
"ruff",
+ "sqls",
"ts_ls",
},
- automatic_installation = true,
+ automatic_enable = true,
handlers = {
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup({
@@ -208,6 +213,11 @@ return {
-- },
})
end,
+ ["sqls"] = function()
+ lspconfig.sqls.setup({
+ capabilities = capabilities,
+ })
+ end,
["ts_ls"] = function()
lspconfig.ruff.setup({
capabilities = capabilities,
@@ -220,12 +230,13 @@ return {
lint.linters_by_ft = {
dockerfile = { "hadolint" },
javascript = { "eslint_d" },
- typescript = { "eslint_d" },
javascriptreact = { "eslint_d" },
- typescriptreact = { "eslint_d" },
- svelte = { "eslint_d" },
python = { "pylint" },
sh = { "shellcheck" },
+ sql = { "sqlfluff" },
+ svelte = { "eslint_d" },
+ typescript = { "eslint_d" },
+ typescriptreact = { "eslint_d" },
}
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
@@ -242,7 +253,7 @@ return {
"black", -- python formatter
"debugpy", -- python debuger
"eslint_d", -- eslint linter
- "hadolint", -- docker linter
+ -- "hadolint", -- docker linter
"isort", -- python formatter
"java-debug-adapter", -- java debugger
"java-test", -- java test
@@ -253,6 +264,8 @@ return {
"ruff", -- python formatter
"shellcheck", -- bash lint
"shfmt", -- sh formatter
+ "sqlfluff", -- sql linter
+ "sql-formatter", -- sql formatter
"stylua", -- lua formatter
},
integrations = {
@@ -331,6 +344,7 @@ return {
markdown = { "prettier" },
python = { "ruff", "isort", "black" },
sh = { "shfmt" },
+ sql = { "sql-formatter" },
svelte = { "prettier" },
typescript = { "prettier" },
typescriptreact = { "prettier" },
@@ -344,7 +358,19 @@ return {
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
- return { lsp_format = "fallback", timeout_ms = 1000, async = false }
+ local ft = vim.bo[bufnr].filetype
+ local off = {
+ javascript = true,
+ typescript = true,
+ javascriptreact = true,
+ typescriptreact = true,
+ json = true,
+ css = true,
+ }
+ if off[ft] then
+ return false
+ end
+ return { lsp_fallback = true, timeout_ms = 1000, async = false }
end,
})