Skip to content

Commit

Permalink
update codeverse to marscode
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxingrui committed Jan 26, 2025
1 parent 7b9982e commit 53e2da8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 116 deletions.
2 changes: 1 addition & 1 deletion nvim/lua/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ keymap("n", "<leader>j", "<cmd>ClangdSwitchSourceHeader<cr>", opts)
-- codeverse
vim.cmd( [[
let g:codeverse_disable_bindings = v:true
inoremap <script><silent><nowait><expr> <C-b> codeverse#Accept()
inoremap <script><silent><nowait><expr> <C-b> marscode#Accept()
]])
-- keymap("i", "<C-[", "<Plug>(codeverse-previous)", opts)
-- keymap("i", "<C-]", "<Plug>(codeverse-next-or-complete)", opts)
Expand Down
131 changes: 16 additions & 115 deletions nvim/lua/plugins/cmp.lua
Original file line number Diff line number Diff line change
@@ -1,117 +1,16 @@
return {
-- {
-- "saadparwaiz1/cmp_luasnip", -- Snippets source for nvim-cmp
-- event = "InsertEnter",
-- },
-- {
-- "L3MON4D3/LuaSnip", -- Snippets plugin
-- dependencies = { "rafamadriz/friendly-snippets" },
-- event = "InsertEnter",
-- config = function()
-- require("luasnip.loaders.from_vscode").lazy_load() -- load freindly-snippets
-- end,
-- },
-- {
-- "hrsh7th/cmp-nvim-lsp", -- LSP source for nvim-cmp
-- event = "InsertEnter",
-- },
--
-- {
-- "danymat/neogen",
-- cmd = { "Neogen" },
-- config = function()
-- require("neogen").setup({ snippet_engine = "luasnip" })
-- end,
-- version = "*",
-- },
-- {
-- "hrsh7th/nvim-cmp", -- Autocompletion plugin
-- event = "InsertEnter",
-- dependencies = {
-- "hrsh7th/cmp-nvim-lsp",
-- "neovim/nvim-lspconfig",
-- "hrsh7th/cmp-nvim-lsp-signature-help",
-- "hrsh7th/cmp-path",
-- "hrsh7th/cmp-buffer",
-- -- "onsails/lspkind.nvim",
-- },
-- config = function()
-- local luasnip = require("luasnip")
-- local cmp = require("cmp")
-- -- local lspkind = require("lspkind")
--
-- local select_next = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_next_item()
-- else
-- fallback()
-- end
-- end, { "i", "s" })
-- local select_prev = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_prev_item()
-- else
-- fallback()
-- end
-- end, { "i", "s" })
--
-- cmp.setup({
-- formatting = {
-- format = function(entry, vim_item)
-- vim_item.menu = ""
-- -- vim_item.kind = ""
-- vim_item.abbr = string.sub(vim_item.abbr, 1, 30)
-- return vim_item
-- end,
--
-- },
-- snippet = {
-- expand = function(args)
-- luasnip.lsp_expand(args.body)
-- end,
-- },
-- mapping = cmp.mapping.preset.insert({
-- ["<C-u>"] = cmp.mapping.scroll_docs(-4), -- Up
-- ["<C-d>"] = cmp.mapping.scroll_docs(4), -- Down
-- -- C-b (back) C-f (forward) for snippet placeholder navigation.
-- ["<C-Space>"] = cmp.mapping.complete(),
-- ["<CR>"] = cmp.mapping.confirm({
-- select = true,
-- behavior = cmp.ConfirmBehavior.Insert,
-- }),
-- ["<C-n>"] = select_next,
-- ["<C-p>"] = select_prev,
-- ["<Tab>"] = select_next,
-- ["<S-Tab>"] = select_prev,
-- }),
-- sources = {
-- { name = "nvim_lsp" },
-- { name = "nvim_lsp_signature_help" },
-- { name = "luasnip" },
-- { name = "buffer" },
-- { name = "path" },
-- { name = "lazydev", group_index = 0 },
-- },
-- })
-- end,
-- },
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
"danymat/neogen",
cmd = { "Neogen" },
config = function()
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
auto_trigger = true,
})
require("neogen").setup({ snippet_engine = "luasnip" })
end,
version = "*",
},
{
'saghen/blink.cmp',
-- optional: provides snippets for the snippet source
dependencies = {
"giuxtaposition/blink-cmp-copilot",
'rafamadriz/friendly-snippets',
{
"folke/lazydev.nvim",
Expand All @@ -124,7 +23,6 @@ return {
},
},
},

},

-- use a release tag to download pre-built binaries
Expand Down Expand Up @@ -161,29 +59,32 @@ return {
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = { 'lsp', "lazydev", 'path', 'snippets', 'buffer', "copilot" },
default = { 'lsp', "lazydev", 'path', 'snippets', 'buffer' },
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
copilot = {
name = "copilot",
module = "blink-cmp-copilot",
score_offset = 99,
async = true,
},
}
},
-- Disable cmdline completions
cmdline = {},
},
signature = { enabled = true }
},
opts_extend = { "sources.default" }
},
{
"[email protected]:chenjiaqi.cposture/codeverse.vim.git",
dependencies = {
"hrsh7th/nvim-cmp",
},
config = function()
require("marscode").setup({
})
end
}

-- {
-- "rcarriga/cmp-dap",
-- event = "InsertEnter",
Expand Down

0 comments on commit 53e2da8

Please sign in to comment.