diff options
| author | Biser Stoilov <[email protected]> | 2021-03-30 22:15:38 +0300 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-30 15:15:38 -0400 | 
| commit | 3bc4bb61039df5909986f0b30bb0638c252859c3 (patch) | |
| tree | 32edceb3b39ab1302fc24f3f803bdfdc64a71265 /lua | |
| parent | c81abf2262524145f7ce0d46a347a7c5b09de4e4 (diff) | |
Database support (#197)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nv-compe/init.lua | 1 | ||||
| -rw-r--r-- | lua/nv-dadbod/init.lua | 6 | ||||
| -rw-r--r-- | lua/nv-globals.lua | 3 | ||||
| -rw-r--r-- | lua/plugins.lua | 5 | 
4 files changed, 14 insertions, 1 deletions
| diff --git a/lua/nv-compe/init.lua b/lua/nv-compe/init.lua index b94f50d0..4837383e 100644 --- a/lua/nv-compe/init.lua +++ b/lua/nv-compe/init.lua @@ -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 = "  "}, diff --git a/lua/nv-dadbod/init.lua b/lua/nv-dadbod/init.lua new file mode 100644 index 00000000..be086679 --- /dev/null +++ b/lua/nv-dadbod/init.lua @@ -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
\ No newline at end of file diff --git a/lua/nv-globals.lua b/lua/nv-globals.lua index 62af193d..31e93f8e 100644 --- a/lua/nv-globals.lua +++ b/lua/nv-globals.lua @@ -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' diff --git a/lua/plugins.lua b/lua/plugins.lua index 84ce1920..21ea5018 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -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' | 
