add sql support

This commit is contained in:
DefectingCat
2024-02-22 16:05:51 +08:00
parent 5590f670db
commit 178572db88
3 changed files with 20 additions and 4 deletions

View File

@ -54,7 +54,7 @@ update_ms = 500
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "cpu direct"
proc_sorting = "memory"
#* Reverse sorting order, True or False.
proc_reversed = False

View File

@ -50,6 +50,13 @@ local opts = {
code_actions.shellcheck,
formatting.shellharden,
formatting.shfmt,
-- sql
diagnostics.sqlfluff.with {
extra_args = { "--dialect", "postgres" }, -- change to your dialect
},
formatting.sqlfluff.with {
extra_args = { "--dialect", "postgres" }, -- change to your dialect
},
},
on_attach = function(client, bufnr)
if client.supports_method "textDocument/formatting" then

View File

@ -14,12 +14,16 @@ vim.g.rustaceanvim = function()
local cfg = require "rustaceanvim.config"
return {
tools = {},
tools = {
hover_actions = {
replace_builtin_hover = false,
},
},
server = {
settings = {
["rust-analyzer"] = {
standalone = true,
cargo = {
--[[ cargo = {
allFeatures = true,
loadOutDirsFromCheck = true,
runBuildScripts = true,
@ -27,7 +31,7 @@ vim.g.rustaceanvim = function()
checkOnSave = {
allFeatures = true,
command = "clippy",
},
}, ]]
files = {
excludeDirs = {
".flatpak-builder",
@ -54,6 +58,11 @@ vim.g.rustaceanvim = function()
},
},
},
cargo = {
allFeatures = true,
loadOutDirsFromCheck = true,
runBuildScripts = true,
},
check = {
command = "clippy",
features = "all",