forked from anishathalye/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhangxingrui
committed
Jan 26, 2025
1 parent
7b9982e
commit 53e2da8
Showing
2 changed files
with
17 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
|
@@ -124,7 +23,6 @@ return { | |
}, | ||
}, | ||
}, | ||
|
||
}, | ||
|
||
-- use a release tag to download pre-built binaries | ||
|
@@ -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", | ||
|