added dadbod for sql
This commit is contained in:
parent
983b76e407
commit
6f68067e1b
2 changed files with 20 additions and 2 deletions
11
init.lua
11
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.
|
||||
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
|
||||
-- If you prefer more traditional completion keymaps,
|
||||
-- you can uncomment the following lines
|
||||
['<CR>'] = cmp.mapping.confirm { select = true },
|
||||
-- ['<CR>'] = cmp.mapping.confirm { select = true },
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<S-Tab>'] = 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,
|
||||
},
|
||||
|
||||
|
|
|
|||
11
lua/custom/plugins/dadbod.lua
Normal file
11
lua/custom/plugins/dadbod.lua
Normal file
|
|
@ -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,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue