mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Added Database Support with dadbod ui
This commit is contained in:
parent
060f56d6d4
commit
fd21a2ecb7
1 changed files with 27 additions and 0 deletions
27
lua/lazyvim/plugins/extras/util/database.lua
Normal file
27
lua/lazyvim/plugins/extras/util/database.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
return {
|
||||||
|
"kristijanhusak/vim-dadbod-ui",
|
||||||
|
dependencies = {
|
||||||
|
{ "tpope/vim-dadbod", lazy = true },
|
||||||
|
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
"DBUI",
|
||||||
|
"DBUIToggle",
|
||||||
|
"DBUIAddConnection",
|
||||||
|
"DBUIFindBuffer",
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
local wk = require("which-key")
|
||||||
|
local wkopts = function(keymaps, description)
|
||||||
|
return { keymaps, description, noremap = true, silent = true }
|
||||||
|
end
|
||||||
|
wk.register({
|
||||||
|
d = {
|
||||||
|
name = "Database UI",
|
||||||
|
e = wkopts("<cmd>DBUI<CR>", "Database Explorer"),
|
||||||
|
a = wkopts("<cmd>DBUIAddConnection<CR>", "Add Database Connection"),
|
||||||
|
},
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
|
vim.g.db_ui_use_nerd_fonts = 1
|
||||||
|
end,
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue