sql setup

This commit is contained in:
Zynh Ludwig 2024-11-15 21:42:58 -08:00
parent 63433f84d8
commit d71bdcddd7
2 changed files with 20 additions and 3 deletions

View file

@ -1,9 +1,11 @@
return { return {
"stevearc/conform.nvim", "stevearc/conform.nvim",
opts = { opts = {
formatters_by_ft = { formatters = {
sql = { "sql_formatter" }, sqlfluff = {
-- nix = { "nixpgs_fmt" }, args = { "format", "--dialect=sqlite", "-" },
}, },
}, },
},
setup = {},
} }

15
lua/plugins/nvim-lint.lua Normal file
View file

@ -0,0 +1,15 @@
return {
"mfussenegger/nvim-lint",
opts = {
linters = {
sqlfluff = {
args = {
"lint",
"--format=json",
-- note: users will have to replace the --dialect argument accordingly
"--dialect=sqlite",
},
},
},
},
}