Skip to content

Commit 781cd5a

Browse files
authored
Merge pull request #35 from haydenrou/add-vim-dadbod
Add vim-dadbod
2 parents 166affd + ae3b1ca commit 781cd5a

File tree

5 files changed

+54
-32
lines changed

5 files changed

+54
-32
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim) as a plugin manager, here
5858
- [Comment.nvim](https://github.com/numToStr/Comment.nvim) to comment out your broken code
5959
- [nvim-surround](https://github.com/kylechui/nvim-surround) to surround whatever you want, with whatever you want
6060
- [conform.nvim](https://github.com/stevearc/conform.nvim) to enable formatters such as eslint
61+
- [vim-dadbod](https://github.com/tpope/vim-dadbod/) for mysql connections and queries in vim
6162

6263
## Notable Settings:
6364

@@ -122,6 +123,9 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim) as a plugin manager, here
122123
- **Undotree:**
123124
- `<leader>u` to open undotree.
124125

126+
- **Dadbod:**
127+
- `<leader>db` to open the database UI.
128+
125129
## LSPs (Language Server Protocols):
126130

127131
By default, the following LSPs will be installed:

nvim/after/plugin/alpha.lua

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ dashboard.section.header.val = asciis[math.random(#asciis)]
66
dashboard.section.header.opts.hl = "String"
77

88
dashboard.section.buttons.val = {
9-
dashboard.button("<C-t>", "find file", ":Telescope find_files<CR>"),
10-
dashboard.button("t", "tree", ":NvimTreeToggle<CR>"),
11-
dashboard.button("\\", "rg", ":lua require'telescope.builtin'.live_grep()<CR>"),
12-
dashboard.button("u", "brew update", ":! brew update --auto-update<CR>"),
13-
dashboard.button("q", "quit", ":qa<CR>"),
9+
dashboard.button("<C-t>", "find file", ":Telescope find_files<CR>"),
10+
dashboard.button("t", "tree", ":NvimTreeToggle<CR>"),
11+
dashboard.button("\\", "rg", ":lua require'telescope.builtin'.live_grep()<CR>"),
12+
dashboard.button("u", "brew update", ":! brew update --auto-update<CR>"),
13+
dashboard.button("q", "quit", ":qa<CR>"),
1414
}
1515

1616
local function footer()
17-
local datetime = os.date(" %d-%m-%Y  %H:%M:%S")
18-
return datetime
19-
.. "  v"
20-
.. vim.version().major
21-
.. "."
22-
.. vim.version().minor
23-
.. "."
24-
.. vim.version().patch
17+
local datetime = os.date(" %d-%m-%Y  %H:%M:%S")
18+
return datetime
19+
.. "  v"
20+
.. vim.version().major
21+
.. "."
22+
.. vim.version().minor
23+
.. "."
24+
.. vim.version().patch
2525
end
2626

2727
dashboard.section.footer.val = footer()

nvim/after/plugin/dadbod.lua

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
local cmp = require "cmp"
2+
local nmap = require("talakhadze.utils.maps").nmap
3+
4+
cmp.setup.filetype({ 'sql' }, {
5+
sources = {
6+
{ name = 'vim-dadbod-completion' },
7+
{ name = 'buffer' },
8+
},
9+
})
10+
11+
nmap("<leader>db", ":DBUIToggle<CR>")

nvim/lazy-lock.json

+21-18
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
{
22
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
3-
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
3+
"LuaSnip": { "branch": "master", "commit": "2b6860d15aaab01d3fb90859c0ba97f20ad7bc5f" },
44
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
5-
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
6-
"conform.nvim": { "branch": "master", "commit": "a6965ac128eba75537ec2bc5ddd5d5e357062bdc" },
7-
"copilot.vim": { "branch": "release", "commit": "1e135c5303bc60598f6314a2276f31dc91aa34dd" },
5+
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
6+
"conform.nvim": { "branch": "master", "commit": "069e971295a34a810484b7b2ef54b3c735214181" },
7+
"copilot.vim": { "branch": "release", "commit": "53d3091be388ff1edacdb84421ccfa19a446a84d" },
88
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
9-
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
10-
"lsp-zero.nvim": { "branch": "v3.x", "commit": "dd39c0d94811554a0227f993c777d5bcd5fd1f6d" },
9+
"lazy.nvim": { "branch": "main", "commit": "70f2c090d3ffb14f8702d468e05beb240b768881" },
10+
"lsp-zero.nvim": { "branch": "v3.x", "commit": "16de3b18c5f7b6230d89b8e64ce9a4801b6f8d08" },
1111
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
12-
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
13-
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
14-
"neovim": { "branch": "main", "commit": "17b466e79479758b332a3cac12544a3ad2be6241" },
15-
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
16-
"nvim-lspconfig": { "branch": "master", "commit": "9eb6d866840df0f3fb1d2e8f34a7e0cfdf80f980" },
17-
"nvim-surround": { "branch": "main", "commit": "a4e30d33add8a9743b4f518b3a788b3c8e5def71" },
18-
"nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" },
19-
"nvim-treesitter": { "branch": "master", "commit": "208d504421e4ac53f4230a34cd4b831e8e76cb69" },
20-
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a6382f744f584bbf71d0a563af789af7190aabda" },
21-
"nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" },
22-
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
12+
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
13+
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
14+
"neovim": { "branch": "main", "commit": "87aa437172357ad8f916942bca249ceadc6c68b1" },
15+
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
16+
"nvim-lspconfig": { "branch": "master", "commit": "e8e71e3dca27631e8a8486a8ab0f7e68c01b6bf7" },
17+
"nvim-surround": { "branch": "main", "commit": "f1f0699a1d49f28e607ffa4361f1bbe757ac5ebc" },
18+
"nvim-tree.lua": { "branch": "master", "commit": "26632f496e7e3c0450d8ecff88f49068cecc8bda" },
19+
"nvim-treesitter": { "branch": "master", "commit": "fc9ee79f64b18bf431e862c2462d4f76d488492a" },
20+
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
21+
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
22+
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
2323
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
2424
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
2525
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
26-
"vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" },
26+
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
27+
"vim-dadbod-completion": { "branch": "master", "commit": "5d5ad196fcde223509d7dabbade0148f7884c5e3" },
28+
"vim-dadbod-ui": { "branch": "master", "commit": "0dc68d9225a70d42f8645049482e090c1a8dce25" },
29+
"vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },
2730
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }
2831
}

nvim/lua/talakhadze/lazy.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ local plugins = {
5252

5353
{ "kylechui/nvim-surround", version = "*", event = "VeryLazy" },
5454

55-
{ 'goolord/alpha-nvim', dependencies = { "nvim-tree/nvim-web-devicons" }, event = "VimEnter" }
55+
{ 'goolord/alpha-nvim', dependencies = { "nvim-tree/nvim-web-devicons" }, event = "VimEnter" },
56+
57+
{ "tpope/vim-dadbod" },
58+
{ "kristijanhusak/vim-dadbod-completion" },
59+
{ "kristijanhusak/vim-dadbod-ui" },
5660
}
5761

5862
require("lazy").setup(plugins, opts)

0 commit comments

Comments
 (0)