2022-03-04 16:54:40 +01:00
|
|
|
" Show completion menu in all cases, and don't select anything
|
|
|
|
set completeopt=menu,menuone,noselect
|
|
|
|
|
|
|
|
lua << EOF
|
|
|
|
local cmp = require("cmp")
|
|
|
|
|
|
|
|
cmp.setup({
|
2022-03-06 11:15:38 +01:00
|
|
|
view = {
|
|
|
|
entries = "native",
|
|
|
|
},
|
2022-03-04 16:54:40 +01:00
|
|
|
sources = {
|
2022-03-06 11:53:48 +01:00
|
|
|
{ name = "path", priority_weight = 110 },
|
|
|
|
{ name = "nvim_lsp", priority_weight = 100 },
|
|
|
|
{ name = "nvim_lua", priority_weight = 90 },
|
|
|
|
{ name = "buffer", priority_weight = 50 },
|
|
|
|
},
|
|
|
|
sorting = {
|
|
|
|
comparators = {
|
|
|
|
cmp.config.compare.offset,
|
|
|
|
cmp.config.compare.exact,
|
|
|
|
cmp.config.compare.score,
|
|
|
|
cmp.config.compare.kind,
|
|
|
|
cmp.config.compare.sort_text,
|
|
|
|
cmp.config.compare.length,
|
|
|
|
cmp.config.compare.order,
|
|
|
|
},
|
2022-03-04 16:54:40 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
EOF
|