mirror of
https://github.com/Hydroxycarbamide/astrovim_user.git
synced 2025-05-04 20:29:08 -04:00
feat: replace nvim-cmp with blink and separate sources in files
This commit is contained in:
parent
badfcf7840
commit
32df610a34
5 changed files with 71 additions and 35 deletions
|
@ -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
35
lua/plugins/codeium.lua
Normal 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
33
lua/plugins/copilot.lua
Normal 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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue