diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-04-12 20:50:45 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-04-12 20:51:09 +0200 |
| commit | d169551792fc3c51bf44ec02abd0244ec053c5eb (patch) | |
| tree | 6d3ace1eb02ade69781b1d63b9c3aaac7935afd1 /after/plugin | |
| parent | 2f09ab84a13e114b8a1585b55ba62e8d31c59370 (diff) | |
| download | nvim-conf-d169551792fc3c51bf44ec02abd0244ec053c5eb.tar.gz nvim-conf-d169551792fc3c51bf44ec02abd0244ec053c5eb.zip | |
Improve the db with completition and status line
Diffstat (limited to 'after/plugin')
| -rw-r--r-- | after/plugin/completition.lua | 12 | ||||
| -rw-r--r-- | after/plugin/dbui.lua | 2 | ||||
| -rw-r--r-- | after/plugin/lualine.lua | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/after/plugin/completition.lua b/after/plugin/completition.lua index 6b3dd22..1b403f1 100644 --- a/after/plugin/completition.lua +++ b/after/plugin/completition.lua @@ -73,6 +73,7 @@ cmp.setup { nvim_lua = "[api]", path = "[path]", luasnip = "[snip]", + ["vim-dadbod-completion"] = "[DB]", -- copilot = "[copilot]", } } @@ -84,6 +85,17 @@ cmp.setup { ghost_text = true, } } + +vim.api.nvim_create_autocmd( + "FileType", + { + pattern = "sql,mysql,plsql", + callback = function() + require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} }) + end + } +) + -- Setup lspconfig. local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled. diff --git a/after/plugin/dbui.lua b/after/plugin/dbui.lua index eaa141c..7715875 100644 --- a/after/plugin/dbui.lua +++ b/after/plugin/dbui.lua @@ -1,6 +1,8 @@ vim.g.db_ui_use_nerd_fonts = 1 vim.g.db_ui_show_database_icon = 1 vim.g.db_ui_force_echo_notifications = 1 +vim.g.db_ui_win_position = 'right' +vim.g.db_ui_winwidth = 80 vim.g.db_ui_table_helpers = { mysql = { diff --git a/after/plugin/lualine.lua b/after/plugin/lualine.lua index 5a10c46..948c493 100644 --- a/after/plugin/lualine.lua +++ b/after/plugin/lualine.lua @@ -12,7 +12,7 @@ lualine.setup{ extensions = {'quickfix', 'fugitive'}, sections = { lualine_a = { { 'mode', upper = true } }, - lualine_b = { { 'branch', icon = '' }, 'diff' }, + lualine_b = { { 'branch', icon = '' }, { 'db_ui#statusline' }, 'diff' }, lualine_c = { { 'filename', file_status = true, path = 1 } }, lualine_x = { { 'diagnostics', sources = { 'nvim_diagnostic' } },'encoding', 'fileformat', 'filetype' }, lualine_y = { 'progress' }, |