feat(plugins): add plugins
This commit is contained in:
parent
fa8b268568
commit
86bdc8207c
|
@ -0,0 +1,3 @@
|
||||||
|
# Neovim plugins
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"tpope/vim-dadbod",
|
||||||
|
dependencies = {
|
||||||
|
"kristijanhusak/vim-dadbod-ui",
|
||||||
|
"kristijanhusak/vim-dadbod-completion",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
db_competion = function()
|
||||||
|
require("cmp").setup.buffer { sources = { { name = "vim-dadbod-completion" } } }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
vim.g.db_ui_save_location = vim.fn.stdpath "config" .. require("plenary.path").path.sep .. "db_ui"
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = {
|
||||||
|
"sql",
|
||||||
|
},
|
||||||
|
command = [[setlocal omnifunc=vim_dadbod_completion#omni]],
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = {
|
||||||
|
"sql",
|
||||||
|
"mysql",
|
||||||
|
"plsql",
|
||||||
|
},
|
||||||
|
callback = function()
|
||||||
|
vim.schedule(opts.db_completion)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>Dt", "<cmd>DBUIToggle<cr>", desc = "Toggle UI" },
|
||||||
|
{ "<leader>Df", "<cmd>DBUIFindBuffer<cr>", desc = "Find Buffer" },
|
||||||
|
{ "<leader>Dr", "<cmd>DBUIRenameBuffer<cr>", desc = "Rename Buffer" },
|
||||||
|
{ "<leader>Dq", "<cmd>DBUILastQueryInfo<cr>", desc = "Last Query Info" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
return {
|
||||||
|
"vim-pandoc/vim-pandoc",
|
||||||
|
version = "*",
|
||||||
|
event = "VeryLazy",
|
||||||
|
dependencies = {
|
||||||
|
'vim-pandoc/vim-pandoc-syntax'
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue