mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-24 17:58:46 +02:00
add: DBUI config example
This commit is contained in:
parent
27f4a6016d
commit
ba64a3073c
6 changed files with 70 additions and 5 deletions
54
lua/custom/plugins/database.lua
Normal file
54
lua/custom/plugins/database.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
return {
|
||||
-- {
|
||||
-- "tpope/vim-dadbod",
|
||||
-- dependencies = {
|
||||
-- "kristijanhusak/vim-dadbod-ui",
|
||||
-- "kristijanhusak/vim-dadbod-completion",
|
||||
-- },
|
||||
-- keys = {
|
||||
-- { "<leader>du", ":DBUIToggle<cr>", desc = "Toggle DB UI" },
|
||||
-- { "<leader>db", ":DBUIFindBuffer<cr>", desc = "DB Find buffer" },
|
||||
-- {
|
||||
-- "<leader>dr",
|
||||
-- ":DBUIRenameBuffer<cr>",
|
||||
-- desc = "DB Rename buffer",
|
||||
-- },
|
||||
-- { "<leader>dl", ":DBUILastQueryInfo<cr>", desc = "DB Last query" },
|
||||
-- },
|
||||
-- config = function()
|
||||
-- local function db_completion()
|
||||
-- require("cmp").setup.buffer {
|
||||
-- sources = { { name = "vim-dadbod-completion" } },
|
||||
-- }
|
||||
-- end
|
||||
--
|
||||
-- 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(db_completion)
|
||||
-- end,
|
||||
-- })
|
||||
-- end,
|
||||
-- cmd = {
|
||||
-- "DBUIToggle",
|
||||
-- "DBUI",
|
||||
-- "DBUIAddConnection",
|
||||
-- "DBUIFindBuffer",
|
||||
-- "DBUIRenameBuffer",
|
||||
-- "DBUILastQueryInfo",
|
||||
-- },
|
||||
-- },
|
||||
}
|
|
@ -81,6 +81,13 @@ return {
|
|||
text_align = "left",
|
||||
padding = 1,
|
||||
},
|
||||
{
|
||||
filetype = "dbui",
|
||||
text = "",
|
||||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
padding = 1,
|
||||
},
|
||||
},
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
|
|
|
@ -20,6 +20,7 @@ if (color == "dracula") and true or false then
|
|||
["@keyword"] = { fg = colors.pink, italic = true },
|
||||
["@keyword.function"] = { fg = colors.cyan, italic = true },
|
||||
["@function"] = { fg = colors.green, italic = true },
|
||||
["@tag.attribute"] = { fg = colors.green, italic = true },
|
||||
["@tag.builtin.javascript"] = { fg = colors.pink },
|
||||
["@tag.delimiter.javascript"] = { fg = colors.fg },
|
||||
["@type.javascript"] = { fg = colors.fg },
|
||||
|
|
|
@ -29,6 +29,8 @@ M.filetype = {
|
|||
"startuptime",
|
||||
"crunner",
|
||||
"lspinfo",
|
||||
"mysql",
|
||||
"dbui",
|
||||
}
|
||||
|
||||
M.rounded = function(colorscheme)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue