diff --git a/init.lua b/init.lua index f075a2c2..b3e7e348 100644 --- a/init.lua +++ b/init.lua @@ -731,11 +731,11 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - -- [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - [''] = cmp.mapping.confirm { select = true }, + -- [''] = cmp.mapping.confirm { select = true }, [''] = cmp.mapping.select_next_item(), [''] = cmp.mapping.select_prev_item(), @@ -772,6 +772,13 @@ require('lazy').setup({ { name = 'path' }, }, } + -- Add Vim-Dadbod completion to the list + cmp.setup.filetype({ 'sql' }, { + sources = { + { name = 'vim-dadbod-completion' }, + { name = 'buffer' }, + }, + }) end, }, diff --git a/lua/custom/plugins/dadbod.lua b/lua/custom/plugins/dadbod.lua new file mode 100644 index 00000000..a23df2d5 --- /dev/null +++ b/lua/custom/plugins/dadbod.lua @@ -0,0 +1,11 @@ +return { + 'kristijanhusak/vim-dadbod-ui', + dependencies = { + { 'tpope/vim-dadbod', lazy = true }, + { 'kristijanhusak/vim-dadbod-completion' }, + }, + config = function() + vim.g.db_ui_use_nerd_fonts = 1 + vim.g.db_ui_show_database_icon = 1 + end, +}