27 snippet = { |
26 snippet = { |
28 expand = function(args) |
27 expand = function(args) |
29 vim.snippet.expand(args.body) |
28 vim.snippet.expand(args.body) |
30 end, |
29 end, |
31 }, |
30 }, |
|
31 ---@diagnostic disable-next-line: missing-fields |
32 formatting = { |
32 formatting = { |
33 format = function(entry, vim_item) |
33 format = function(entry, vim_item) |
34 if vim_item.kind == "Text" then |
34 if vim_item.kind == "Text" then |
35 vim_item.kind = entry.source.name |
35 vim_item.kind = entry.source.name |
36 end |
36 end |
67 cmp.confirm({ select = false }) |
67 cmp.confirm({ select = false }) |
68 fallback() |
68 fallback() |
69 end, { "i", "s" }), |
69 end, { "i", "s" }), |
70 }), |
70 }), |
71 sources = cmp.config.sources({ |
71 sources = cmp.config.sources({ |
|
72 { name = "lazydev" }, |
|
73 }, { |
72 { name = "nvim_lsp" }, |
74 { name = "nvim_lsp" }, |
73 { name = "nvim_lua" }, |
75 }, { |
74 { name = "buffer", option = { keyword_pattern = [[\k\+]] } }, |
76 { name = "buffer", option = { keyword_pattern = [[\k\+]] } }, |
75 { name = "path" }, |
77 { name = "path" }, |
|
78 }, { |
76 { name = "tags" }, |
79 { name = "tags" }, |
77 { name = "calc" }, |
80 { name = "calc" }, |
78 }), |
81 }), |
79 }) |
82 }) |
80 end, |
83 end, |