mirror of
https://github.com/cap153/nvim.git
synced 2026-04-25 15:45:16 +08:00
暂时先用blink.cmp v1
This commit is contained in:
parent
d9aa5500fd
commit
56d93db2a3
5 changed files with 27 additions and 22 deletions
|
|
@ -3,7 +3,9 @@ if vim.g.vscode then return end
|
|||
|
||||
local P = {
|
||||
name = "blink.cmp",
|
||||
deps = { "friendly-snippets" },
|
||||
deps = {
|
||||
"friendly-snippets"
|
||||
},
|
||||
-- build_cmd = "cargo build --release",
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ vim.api.nvim_create_user_command("PeekToggle", function()
|
|||
})
|
||||
end)
|
||||
peek.open()
|
||||
else
|
||||
peek.close()
|
||||
else -- 只有加载了插件的情况下执行关闭,这样可以跳过非markdown文件
|
||||
if PackUtils.plugin_loaded[P.name] then
|
||||
peek.close()
|
||||
end
|
||||
end
|
||||
end, { desc = "Lazy load and open Peek" })
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ local P = {
|
|||
}
|
||||
|
||||
-- 快捷键触发
|
||||
vim.keymap.set({ "n", "x" }, "<leader>u", function()
|
||||
vim.keymap.set({ "n", "x" }, "<leader>t", function()
|
||||
PackUtils.load(P, function()
|
||||
require('undotree').setup({
|
||||
keymaps = {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ local specs = {
|
|||
'https://github.com/mason-org/mason-registry',
|
||||
'https://github.com/nvim-tree/nvim-web-devicons',
|
||||
-- blinkcmp.lua 自动补全、代码片段
|
||||
'https://github.com/saghen/blink.cmp',
|
||||
{ src = 'https://github.com/saghen/blink.cmp', version = "v1" },
|
||||
'https://github.com/rafamadriz/friendly-snippets',
|
||||
-- lspconfig.lua
|
||||
'https://github.com/neovim/nvim-lspconfig',
|
||||
|
|
@ -89,7 +89,7 @@ end
|
|||
-- :PackUpdate 命令更新插件,不带参数更新全部,默认显示审查界面(需按 :w 确认);可以加 ! 强制直接更新
|
||||
vim.api.nvim_create_user_command("PackUpdate", function(opts)
|
||||
local targets = #opts.fargs > 0 and opts.fargs or nil
|
||||
local force = opts.bang -- 如果输入了 PackUpdate! 则 opts.bang 为 true
|
||||
local force = opts.bang -- 如果输入了 PackUpdate! 则 opts.bang 为 true
|
||||
if targets then
|
||||
vim.notify("Checking updates for: " .. table.concat(targets, ", "), vim.log.levels.INFO)
|
||||
else
|
||||
|
|
@ -98,7 +98,7 @@ vim.api.nvim_create_user_command("PackUpdate", function(opts)
|
|||
vim.pack.update(targets, { force = force })
|
||||
end, {
|
||||
nargs = "*",
|
||||
bang = true, -- 声明支持 ! 符号
|
||||
bang = true, -- 声明支持 ! 符号
|
||||
complete = get_plugin_names,
|
||||
desc = "Update plugins (use ! to skip confirmation)",
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"plugins": {
|
||||
"blink.cmp": {
|
||||
"rev": "c573a15a62bd0bfd4006ee0849b24f5404395500",
|
||||
"src": "https://github.com/saghen/blink.cmp"
|
||||
"rev": "78336bc89ee5365633bcf754d93df01678b5c08f",
|
||||
"src": "https://github.com/saghen/blink.cmp",
|
||||
"version": "'v1'"
|
||||
},
|
||||
"bufferline.nvim": {
|
||||
"rev": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3",
|
||||
|
|
@ -13,7 +14,7 @@
|
|||
"src": "https://github.com/CRAG666/code_runner.nvim"
|
||||
},
|
||||
"conform.nvim": {
|
||||
"rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395",
|
||||
"rev": "dca1a190aa85f9065979ef35802fb77131911106",
|
||||
"src": "https://github.com/stevearc/conform.nvim"
|
||||
},
|
||||
"friendly-snippets": {
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
"src": "https://github.com/rafamadriz/friendly-snippets"
|
||||
},
|
||||
"gitsigns.nvim": {
|
||||
"rev": "8d82c240f190fc33723d48c308ccc1ed8baad69d",
|
||||
"rev": "6d808f99bd63303646794406e270bd553ad7792e",
|
||||
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
"indent-blankline.nvim": {
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
"src": "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
},
|
||||
"inlay-hints.nvim": {
|
||||
"rev": "11be32be3761c6263df2311afb6baa0de0863967",
|
||||
"rev": "2246824571cf2fe16f483980673caa18304440c5",
|
||||
"src": "https://github.com/MysticalDevil/inlay-hints.nvim"
|
||||
},
|
||||
"lualine.nvim": {
|
||||
|
|
@ -37,19 +38,19 @@
|
|||
"src": "https://github.com/nvim-lualine/lualine.nvim"
|
||||
},
|
||||
"mason-lspconfig.nvim": {
|
||||
"rev": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b",
|
||||
"rev": "0a3b42c3e503df87aef6d6513e13148381495c3a",
|
||||
"src": "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||
},
|
||||
"mason-registry": {
|
||||
"rev": "0cf1d9c928faa72f625a7a595942daf69ad17e0d",
|
||||
"rev": "727545df38e9b84673ebbe943b4e2323fd03d552",
|
||||
"src": "https://github.com/mason-org/mason-registry"
|
||||
},
|
||||
"mason.nvim": {
|
||||
"rev": "b03fb0f20bc1d43daf558cda981a2be22e73ac42",
|
||||
"rev": "12ddd182d9efbdc848b540f16484a583d52da0fb",
|
||||
"src": "https://github.com/williamboman/mason.nvim"
|
||||
},
|
||||
"mini.nvim": {
|
||||
"rev": "c67822c53e8e282fe863343e88aa0a8ca3534059",
|
||||
"rev": "5849ef04c32a6a8e55957b946c0a275801d87530",
|
||||
"src": "https://github.com/echasnovski/mini.nvim"
|
||||
},
|
||||
"noice.nvim": {
|
||||
|
|
@ -65,7 +66,7 @@
|
|||
"src": "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"rev": "4b7fbaa239c5db6b36f424a4521ca9f1a401be33",
|
||||
"rev": "e146efacbafed3789ac568abcc5a981c5decaa58",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
|
|
@ -81,7 +82,7 @@
|
|||
"src": "https://github.com/kevinhwang91/nvim-ufo"
|
||||
},
|
||||
"nvim-web-devicons": {
|
||||
"rev": "6e76c5e47e957fbf080b1fdac165c66dbd2e7cfb",
|
||||
"rev": "c72328a5494b4502947a022fe69c0c47e53b6aa6",
|
||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
"outline.nvim": {
|
||||
|
|
@ -89,7 +90,7 @@
|
|||
"src": "https://github.com/hedyhli/outline.nvim"
|
||||
},
|
||||
"peek.nvim": {
|
||||
"rev": "81365a4dee6f0314d1ab4f65b7f8aee804e741ed",
|
||||
"rev": "19c98125c3dd732672c635e1255f7ed4205a1272",
|
||||
"src": "https://github.com/cap153/peek.nvim"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
|
|
@ -101,7 +102,7 @@
|
|||
"src": "https://github.com/kevinhwang91/promise-async"
|
||||
},
|
||||
"rainbow-delimiters.nvim": {
|
||||
"rev": "aab6caaffd79b8def22ec4320a5344f7c42f58d2",
|
||||
"rev": "08783ec022e7ddefe0f12a16f1ac4968f55478b0",
|
||||
"src": "https://github.com/HiPhish/rainbow-delimiters.nvim"
|
||||
},
|
||||
"snacks.nvim": {
|
||||
|
|
@ -113,7 +114,7 @@
|
|||
"src": "https://github.com/uga-rosa/translate.nvim"
|
||||
},
|
||||
"tv.nvim": {
|
||||
"rev": "c0603ca8f31299c83deaa9a24a63d67116db25cd",
|
||||
"rev": "b6611fa96f1b5e7a1f01d31db944b87058f03146",
|
||||
"src": "https://github.com/alexpasmantier/tv.nvim"
|
||||
},
|
||||
"undotree": {
|
||||
|
|
@ -129,7 +130,7 @@
|
|||
"src": "https://github.com/folke/which-key.nvim"
|
||||
},
|
||||
"yazi.nvim": {
|
||||
"rev": "e7094dcfd897600e02a23e8334cdfeb9ee07dc17",
|
||||
"rev": "d34b366517a21fb2366e8ac393fc903008345173",
|
||||
"src": "https://github.com/mikavilpas/yazi.nvim"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue