Database support (#197)

This commit is contained in:
Biser Stoilov 2021-03-30 22:15:38 +03:00 committed by GitHub
parent c81abf2262
commit 3bc4bb6103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 1 deletions

View file

@ -36,6 +36,7 @@ require('nv-nvim-dap')
require('nv-lightbulb')
require('nv-indentline')
require('nv-bookmark')
require('nv-dadbod')
-- require('nv-lspinstall')
-- Which Key (Hope to replace with Lua plugin someday)

View file

@ -24,6 +24,7 @@ require'compe'.setup {
nvim_lua = false,
spell = {kind = ""},
tags = false,
vim_dadbod_completion = true,
-- snippets_nvim = {kind = "  "},
-- ultisnips = {kind = "  "},
-- treesitter = {kind = "  "},

6
lua/nv-dadbod/init.lua Normal file
View file

@ -0,0 +1,6 @@
vim.api.nvim_set_keymap("n", "<leader>Du", ":DBUIToggle<CR>", {noremap=true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>Df", ":DBUIFindBuffer<CR>", {noremap=true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>Dr", ":DBUIRenameBuffer<CR>", {noremap=true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>Dl", ":DBUILastQueryInfo<CR>", {noremap=true, silent = true})
vim.g.db_ui_save_location = O.db_ui_save_location
vim.g.db_ui_auto_execute_table_helpers = 1

View file

@ -3,7 +3,8 @@ O = {
auto_complete = true,
colorscheme = 'nvcode',
relative_number = true,
shell = "bash",
shell = 'bash',
db_ui_save_location = '~/.config/nvcode_db',
python = {
linter = '',
-- @usage can be 'yapf', 'black'

View file

@ -113,6 +113,11 @@ return require('packer').startup(function(use)
use 'MattesGroeger/vim-bookmarks'
use 'windwp/nvim-autopairs'
-- Database
use 'tpope/vim-dadbod'
use 'kristijanhusak/vim-dadbod-ui'
use 'kristijanhusak/vim-dadbod-completion'
-- TODO put this back when stable for indent lines
-- vim.g.indent_blankline_space_char = ''
-- use 'b3nj5m1n/kommentary'