diff --git a/coc-settings.json b/coc-settings.json index 674e36a..46a4592 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -1,7 +1,7 @@ { - "suggest.enableFloat": true, + "suggest.enableFloat": false, "diagnostic.enable": false, "inlayHint.enable": false, - "codeLens.enable": true, + "codeLens.enable": false, "snippets.ultisnips.pythonPrompt": false, } diff --git a/lazy-lock.json b/lazy-lock.json index d0ca9c8..9ac34ff 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,10 +5,11 @@ "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" }, + "coc-code-action-menu.nvim": { "branch": "main", "commit": "42c641ac3ac366d6f0f2536bac4407cba64bae77" }, "coc.nvim": { "branch": "release", "commit": "4fee4938afa69843a3c147f9fdb453de67a1a7a2" }, - "codecompanion.nvim": { "branch": "main", "commit": "cad16ab80e99c990e2f459581379109c1d47cf3f" }, + "codecompanion.nvim": { "branch": "main", "commit": "ac1c3c9d937eb90280eecd00efc12b1b9858b94f" }, "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, - "copilot.lua": { "branch": "master", "commit": "a620a5a97b73faba009a8160bab2885316e1451c" }, + "copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, @@ -20,6 +21,7 @@ "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 1f946d3..6f05c83 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -99,6 +99,7 @@ keyset("v", "", '"1d"+gP', { desc = "Remove the selected part and paste fro keyset("v", "", '"+y', { desc = "Copy to clipboard in visual mode" }) keyset("v", "", '"+d', { desc = "Cut to clipboard" }) map_nv("", "ggG", { desc = "Select all" }) ---integrate coc with lsp ---TODO:make this work --- local function code_action_merge() +-- Test: Code action Menu +vim.keymap.set("n", "m", function() + require("tiny-code-action").code_action() +end, { noremap = true, silent = true }) diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua index fba8a9b..be78f52 100644 --- a/lua/plugins/example.lua +++ b/lua/plugins/example.lua @@ -25,10 +25,10 @@ return { -- TODO: Try to use this without warning opts = { spec = { - { "c", group = "code" }, - { "d", group = "debug" }, + { "c", group = "code", mode = { "n", "v" } }, + { "d", group = "debug", mode = { "n", "v" } }, { "r", icon = "󰑕", group = "Rename (COC)" }, - { "a", group = "AI" } + { "a", group = "AI", mode = { "n", "v" } } }, -- name = "\\", -- d = { name = "+debug" }, @@ -227,26 +227,21 @@ return { }, }, }, - { "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" }, + -- Map ai to run CodeCompanion on the selected range in normal and visual modes + { "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 = { @@ -254,17 +249,37 @@ return { provider = "mini_diff", }, }, - strategies = { chat = { adapter = "copilot" }, inline = { adapter = "copilot" }, }, - opts = { language = "English", -- "English"|"Chinese" }, }, }, + { + "chentoast/marks.nvim", + event = "VeryLazy", + opts = { + default_mappings = false, + mappings = { + set_next = "m,", + toggle = "m;", + delete_line = "dm-", + delete_buf = "dm", + preview = "m:", + delete = "dm", + delete_bookmark = "dm=", + next = "]`", + prev = "[`", + -- TODO: This seems not working + -- annotate = "m*", + } + } + }, + { "rachartier/tiny-code-action.nvim" }, + { "xiyaowong/coc-code-action-menu.nvim" }, } -- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim --