feat(nvim): add (p)sql formatting

This commit is contained in:
Price Hiller 2023-12-10 00:40:17 -06:00
parent ecb367719d
commit d9a0e4f05e
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
2 changed files with 20 additions and 0 deletions

View File

@ -11,12 +11,14 @@ M.setup = function()
[".*/Azure%-Pipelines/.*%.yaml"] = "azure-pipelines",
[".*/waybar/config"] = "jsonc",
[".*/etc/systemd/.*"] = "systemd",
[".*%.psql"] = "sql"
},
})
vim.treesitter.language.register("yaml", "azure-pipelines")
vim.treesitter.language.register("gitignore", "dockerignore")
vim.treesitter.language.register("html", "xml")
vim.treesitter.language.register("sql", "psql")
end
return M

View File

@ -25,6 +25,24 @@ return {
markdown = filetypes.markdown.prettierd,
css = filetypes.css.prettierd,
lua = filetypes.lua.stylua,
psql = function ()
return {
exe = "sql-formatter",
args = {
"-l",
"postgresql",
"--fix",
},
}
end,
sql = function ()
return {
exe = "sql-formatter",
args = {
"--fix",
},
}
end,
asm = function()
return {
exe = "asmfmt",