feat: replace nvim-cmp with blink and separate sources in files

This commit is contained in:
Hydroxycarbamide 2025-03-26 22:35:12 +01:00
parent badfcf7840
commit 32df610a34
Signed by: Siklos
GPG key ID: C06D07D96997549A
5 changed files with 71 additions and 35 deletions

View file

@ -8,10 +8,13 @@
"astrolsp": { "branch": "main", "commit": "0ab285f47b9f667402f08eb471e3e98f9a50b5ee" },
"astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" },
"astroui": { "branch": "main", "commit": "7a46b59fc51afb91bcb37f7a2ef3f8811b66bc93" },
"blink-copilot": { "branch": "main", "commit": "100691cd842ff0bd957683424ad0e829f71ce262" },
"blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" },
"blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" },
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
"codeium.nvim": { "branch": "main", "commit": "2b10c17c46e43154ebd058f6b3d3842dd8fa7cab" },
"copilot.lua": { "branch": "master", "commit": "b9300fbd5eeeae294eb76ba6c35c44fbd8b71c1b" },
"copilot.vim": { "branch": "release", "commit": "a9228e015528c9307890c48083c925eb98a64a79" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"git-blame.nvim": { "branch": "master", "commit": "b12da2156ec1c3f53f42c129201ff0bfed69c86e" },
@ -34,7 +37,6 @@
"none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" },
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
"nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" },
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
"nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" },
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
"nvim-highlight-colors": { "branch": "main", "commit": "7eeaa05eab26fb840c4fe7bca91710bf37cb13ed" },

View file

@ -1,17 +0,0 @@
return { -- override nvim-cmp plugin
"hrsh7th/nvim-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 = "buffer", priority = 500 },
{ name = "path", priority = 250 },
{ name = "codeium", priority = 2000 }
})
end,
}

35
lua/plugins/codeium.lua Normal file
View file

@ -0,0 +1,35 @@
return {
{
"Exafunction/codeium.nvim",
enabled = true,
dependencies = {
"nvim-lua/plenary.nvim",
},
event = "BufEnter",
config = function() require("codeium").setup {} end,
},
{
"Saghen/blink.cmp",
optional = true,
dependencies = {
"codeium.nvim",
},
specs = {
-- install the blink, nvim-cmp compatibility layer
{ "Saghen/blink.compat", version = "*", lazy = true, opts = {} },
},
opts = {
sources = {
default = { "codeium" },
providers = {
codeium = {
name = "codeium",
module = "blink.compat.source",
score_offset = 100,
async = true,
},
},
},
},
},
}

33
lua/plugins/copilot.lua Normal file
View file

@ -0,0 +1,33 @@
return {
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
opts = {
suggestion = { enabled = false },
panel = { enabled = false },
filetypes = {
markdown = true,
help = true,
},
},
},
{
"saghen/blink.cmp",
optional = true,
dependencies = { "fang2hou/blink-copilot" },
opts = {
sources = {
default = { "copilot" },
providers = {
copilot = {
name = "copilot",
module = "blink-copilot",
score_offset = 100,
async = true,
},
},
},
},
},
}

View file

@ -85,23 +85,6 @@ return {
end,
},
{
"github/copilot.vim",
enabled = true,
},
{
"Exafunction/codeium.nvim",
enabled = false,
dependencies = {
"nvim-lua/plenary.nvim",
"hrsh7th/nvim-cmp",
},
event = "BufEnter",
config = function()
require("codeium").setup({
})
end
},
{
"Wansmer/symbol-usage.nvim",
event = "BufReadPre", -- need run before LspAttach if you use nvim 0.9. On 0.10 use 'LspAttach'