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", #* 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. #* "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. #* Reverse sorting order, True or False.
proc_reversed = False proc_reversed = False

View File

@ -50,6 +50,13 @@ local opts = {
code_actions.shellcheck, code_actions.shellcheck,
formatting.shellharden, formatting.shellharden,
formatting.shfmt, 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) on_attach = function(client, bufnr)
if client.supports_method "textDocument/formatting" then if client.supports_method "textDocument/formatting" then

View File

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