summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/cmp.lua
blob: 8f9dae223dacd40cefc43736f95fb83e861b48b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local cmp = require('cmp')

cmp.setup({
  mapping = {
    ['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
    ['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
    ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
    -- ['<C-l>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
    -- ['<CR>'] = cmp.mapping.confirm({ select = true })
  },
  sources = cmp.config.sources({
    { name = 'nvim_lsp' },
    -- { name = 'cmdline' },
    { name = 'path' },
    { name = 'calc' }
  },
  {
    { name = 'buffer' }
  })
})

cmp.setup.cmdline('/', {
  sources = {
    { name = 'buffer' }
  }
})
remember that computers suck.