-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmp.lua
More file actions
78 lines (77 loc) · 2.13 KB
/
cmp.lua
File metadata and controls
78 lines (77 loc) · 2.13 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
-- You can also add or configure plugins by creating files in this `plugins/` folder
-- Here are some examples:
---@type LazySpec
return {
-- {
-- "chrisgrieser/cmp_yanky",
-- opt = {
-- -- only suggest items which match the current filetype
-- onlyCurrentFiletype = false,
-- -- only suggest items with a minimum length
-- minLength = 3,
-- },
-- },
{
"Exafunction/codeium.nvim",
lazy = false,
cmd = "Codeium",
opts = {
enable_chat = true,
},
dependencies = {
{
"AstroNvim/astroui",
---@type AstroUIOpts
opts = {
icons = {
Codeium = "",
},
},
},
{
"AstroNvim/astrocore",
---@param opts AstroCoreOpts
opts = function(_, opts)
return require("astrocore").extend_tbl(opts, {
mappings = {
n = {
["<Leader>;"] = {
desc = require("astroui").get_icon("Codeium", 1, true) .. "Codeium",
},
["<Leader>;o"] = {
desc = "Open Chat",
function() vim.cmd "Codeium Chat" end,
},
},
},
})
end,
},
},
},
{ -- override nvim-cmp plugin
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji", -- add cmp source as dependency of cmp
},
-- override the options table that is used in the `require("cmp").setup()` call
opts = function(_, opts)
-- opts parameter is the default options table
-- the function is lazy loaded so cmp is able to be required
local cmp = require "cmp"
-- modify the sources part of the options table
opts.sources = cmp.config.sources {
{ name = "nvim_lsp", priority = 1000 },
{ name = "luasnip", priority = 750 },
-- { name = "cmp_yanky", priority = 650 },
{
name = "codeium",
priority = 1100,
},
{ name = "buffer", priority = 500 },
{ name = "path", priority = 250 },
{ name = "emoji", priority = 700 }, -- add new source
}
end,
},
}