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",
|
[".*/Azure%-Pipelines/.*%.yaml"] = "azure-pipelines",
|
||||||
[".*/waybar/config"] = "jsonc",
|
[".*/waybar/config"] = "jsonc",
|
||||||
[".*/etc/systemd/.*"] = "systemd",
|
[".*/etc/systemd/.*"] = "systemd",
|
||||||
|
[".*%.psql"] = "sql"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.treesitter.language.register("yaml", "azure-pipelines")
|
vim.treesitter.language.register("yaml", "azure-pipelines")
|
||||||
vim.treesitter.language.register("gitignore", "dockerignore")
|
vim.treesitter.language.register("gitignore", "dockerignore")
|
||||||
vim.treesitter.language.register("html", "xml")
|
vim.treesitter.language.register("html", "xml")
|
||||||
|
vim.treesitter.language.register("sql", "psql")
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -25,6 +25,24 @@ return {
|
|||||||
markdown = filetypes.markdown.prettierd,
|
markdown = filetypes.markdown.prettierd,
|
||||||
css = filetypes.css.prettierd,
|
css = filetypes.css.prettierd,
|
||||||
lua = filetypes.lua.stylua,
|
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()
|
asm = function()
|
||||||
return {
|
return {
|
||||||
exe = "asmfmt",
|
exe = "asmfmt",
|
||||||
|
Loading…
Reference in New Issue
Block a user