summaryrefslogtreecommitdiff
path: root/mac
diff options
context:
space:
mode:
Diffstat (limited to 'mac')
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua1
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua42
2 files changed, 33 insertions, 10 deletions
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua
index c33d37d..7d4fb9e 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/dadbod.lua
@@ -20,6 +20,7 @@ return {
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/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
index b7b5812..da49976 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
@@ -101,6 +101,7 @@ return {
-- "mutt_ls",
"pyright",
"ruff",
+ "sqls",
"ts_ls",
},
automatic_enable = true,
@@ -212,6 +213,11 @@ return {
-- },
})
end,
+ ["sqls"] = function()
+ lspconfig.sqls.setup({
+ capabilities = capabilities,
+ })
+ end,
["ts_ls"] = function()
lspconfig.ruff.setup({
capabilities = capabilities,
@@ -224,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 })
@@ -257,6 +264,8 @@ return {
"ruff", -- python formatter
"shellcheck", -- bash lint
"shfmt", -- sh formatter
+ "sqlfluff", -- sql linter
+ "sql-formatter", -- sql formatter
"stylua", -- lua formatter
},
integrations = {
@@ -324,20 +333,21 @@ return {
require("conform").setup({
formatters_by_ft = {
bash = { "shfmt" },
- -- css = { "prettier" },
+ css = { "prettier" },
graphql = { "prettier" },
html = { "prettier" },
- -- javascript = { "prettier" },
- -- javascriptreact = { "prettier" },
- -- json = { "prettier" },
+ javascript = { "prettier" },
+ javascriptreact = { "prettier" },
+ json = { "prettier" },
liquid = { "prettier" },
lua = { "stylua" },
markdown = { "prettier" },
python = { "ruff", "isort", "black" },
sh = { "shfmt" },
+ sql = { "sql-formatter" },
svelte = { "prettier" },
- -- typescript = { "prettier" },
- -- typescriptreact = { "prettier" },
+ typescript = { "prettier" },
+ typescriptreact = { "prettier" },
vimwiki = { "prettier" },
yaml = { "prettier" },
zsh = { "beautysh" },
@@ -348,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,
})