diff --git a/lazy-lock.json b/lazy-lock.json index f25565d..d0ca9c8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,14 +1,15 @@ { - "CopilotChat.nvim": { "branch": "main", "commit": "16d897fd43d07e3b54478ccdb2f8a16e4df4f45a" }, "LazyVim": { "branch": "main", "commit": "25abbf546d564dc484cf903804661ba12de45507" }, "SchemaStore.nvim": { "branch": "main", "commit": "a3a7a4f1963ee4eb7d4274e4381f5d5338179cf3" }, - "blink-copilot": { "branch": "main", "commit": "bdc45bbbed2ec252b3a29f4adecf031e157b5573" }, + "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" }, "coc.nvim": { "branch": "release", "commit": "4fee4938afa69843a3c147f9fdb453de67a1a7a2" }, + "codecompanion.nvim": { "branch": "main", "commit": "cad16ab80e99c990e2f459581379109c1d47cf3f" }, "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, - "copilot.vim": { "branch": "release", "commit": "3955014c503b0cd7b30bc56c86c56c0736ca0951" }, + "copilot.lua": { "branch": "master", "commit": "a620a5a97b73faba009a8160bab2885316e1451c" }, + "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "fzf-lua": { "branch": "main", "commit": "d155cc9648ba391f64876888ea0ae09a7aff469d" }, @@ -17,13 +18,13 @@ "img-clip.nvim": { "branch": "main", "commit": "d8b6b030672f9f551a0e3526347699985a779d93" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "mini.ai": { "branch": "main", "commit": "d172ada7b0281044a06cb9a625a862553c457b6f" }, + "mini.diff": { "branch": "main", "commit": "9bccf260cdb9308223f47a29fb4cb91c817a9349" }, "mini.icons": { "branch": "main", "commit": "94848dad1589a199f876539bd79befb0c5e3abf0" }, "mini.pairs": { "branch": "main", "commit": "42407ccb80ec59c84e7c91d815f42ed90a8cc093" }, "mini.surround": { "branch": "main", "commit": "1a2b59c77a0c4713a5bd8972da322f842f4821b1" }, @@ -44,7 +45,6 @@ "nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "refactoring.nvim": { "branch": "master", "commit": "9cd0186ffe76fe6abc64c0aafb775c8f776ab5ee" }, diff --git a/lazyvim.json b/lazyvim.json index 51e1c24..60b0892 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -4,6 +4,7 @@ "lazyvim.plugins.extras.coding.mini-surround", "lazyvim.plugins.extras.coding.yanky", "lazyvim.plugins.extras.dap.core", + "lazyvim.plugins.extras.editor.mini-diff", "lazyvim.plugins.extras.editor.refactoring", "lazyvim.plugins.extras.lang.json", "lazyvim.plugins.extras.lang.markdown", diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua index e809670..fba8a9b 100644 --- a/lua/plugins/example.lua +++ b/lua/plugins/example.lua @@ -22,14 +22,17 @@ return { }, { "folke/which-key.nvim", - --TODO: Try to use this without warning - -- opts = function(_, opts) - -- -- 添加 '\' 开头的提示组 - -- opts.defaults["\\"] = { - -- name = "\\", -- 或你喜欢的名字,比如 '+custom' - -- d = { name = "+debug" }, -- 这样会提示 \d 有 "debug" 的子命令 - -- } - -- end, + -- TODO: Try to use this without warning + opts = { + spec = { + { "c", group = "code" }, + { "d", group = "debug" }, + { "r", icon = "󰑕", group = "Rename (COC)" }, + { "a", group = "AI" } + }, + -- name = "\\", + -- d = { name = "+debug" }, + }, }, { "lervag/vimtex", @@ -49,14 +52,6 @@ return { "-file-line-error", -- file line error messages }, } - -- Ensuring custom matchers are used - -- vim.g.vimtex_toc_custom_matchers = { - -- { title = "Theorem", re = [[\v^\s*\\begin\{theorem\}]] }, - -- { title = "Lemma", re = [[\v^\s*\\begin\{lemma\}]] }, - -- { title = "Corollary", re = [[\v^\s*\\begin\{corollary\}]] }, - -- { title = "Definition", re = [[\v^\s*\\begin\{definition\}]] }, - -- } - -- vim.g.vimtex_toc_matchers = vim.g.vimtex_toc_custom_matchers end, }, { @@ -210,8 +205,8 @@ return { "folke/snacks.nvim", opts = { terminal = {}, - } - } + }, + }, }, event = "LspAttach", opts = {}, @@ -219,7 +214,57 @@ return { { "flin16/vim-overleaf", }, + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "VeryLazy", + opts = { + suggestion = { enabled = false }, + panel = { enabled = false }, + filetypes = { + markdown = true, + help = true, + }, + }, + }, + { + "olimorris/codecompanion.nvim", + dependencies = { + "echasnovski/mini.diff", + "j-hui/fidget.nvim", + }, + + init = function() + require("utils.codecompanion_fidget_spinner"):init() + end, + + -- stylua: ignore + keys = { + { "aa", "CodeCompanionActions", mode = { "n", "v" }, noremap = true, silent = true, desc = "CodeCompanion actions" }, + { "ai", "CodeCompanion", mode = { "n", "v" }, noremap = true, silent = true, desc = "CodeCompanion inline" }, + { "ac", "CodeCompanionChat Toggle", mode = { "n", "v" }, noremap = true, silent = true, desc = "CodeCompanion chat (toggle)" }, + { "ap", "CodeCompanionChat Add", mode = { "v" }, noremap = true, silent = true, desc = "CodeCompanion chat add code" }, + }, + + opts = { + display = { + diff = { + enabled = true, + provider = "mini_diff", + }, + }, + + strategies = { + chat = { adapter = "copilot" }, + inline = { adapter = "copilot" }, + }, + + opts = { + language = "English", -- "English"|"Chinese" + }, + }, + }, } -- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim --