feat(nvim): add (p)sql formatting
This commit is contained in:
parent
ecb367719d
commit
d9a0e4f05e
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user