Skip to content

Commit

Permalink
dadbod
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed May 5, 2024
1 parent b2fc4a1 commit 0c3a401
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lua/modules/completion/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ function config.nvim_cmp()
{ name = 'treesitter', keyword_length = 2 },

-- { name = "cmp_tabnine", keyword_length = 0 },
{ name = 'emoji' },
{ name = 'path' },
-- { name = 'copilot' },
{ name = 'buffer' },
Expand Down Expand Up @@ -68,6 +67,7 @@ function config.nvim_cmp()
table.insert(sources, { name = 'buffer', keyword_length = 3 })
table.insert(sources, { name = 'calc' })
end

local compare = require('cmp.config.compare')
cmp.setup({
snippet = {
Expand Down Expand Up @@ -99,6 +99,7 @@ function config.nvim_cmp()
spell = '󰓆',
emoji = '󰞅',
latex_symbols = '󰿉',
['vim-dadbod-completion'] = '',
-- copilot = '🤖',
-- cmp_tabnine = '🤖',
look = '',
Expand Down
2 changes: 1 addition & 1 deletion lua/modules/completion/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ return function(use)
init = function()
-- vim.cmd([[autocmd FileType sql setlocal omnifunc=vim_dadbod_completion#omni]])
vim.cmd(
[[autocmd FileType sql,mysql,plsql lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-use' }} })]]
[[autocmd FileType sql,mysql,plsql lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }, {name = 'buffer'}, {name = 'treesitter'}} })]]
)
end,
})
Expand Down

0 comments on commit 0c3a401

Please sign in to comment.