feat(plugins): integrate marks.nvim with custom mappings

pull/128/head
flin16 2025-06-14 15:20:33 -05:00
parent 12e28f982d
commit 12b049ef3e
4 changed files with 37 additions and 19 deletions

View File

@ -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,
}

View File

@ -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" },

View File

@ -99,6 +99,7 @@ keyset("v", "<D-v>", '"1d"+gP', { desc = "Remove the selected part and paste fro
keyset("v", "<D-c>", '"+y', { desc = "Copy to clipboard in visual mode" })
keyset("v", "<D-x>", '"+d', { desc = "Cut to clipboard" })
map_nv("<D-a>", "gg<S-v>G", { desc = "Select all" })
--integrate coc with lsp
--TODO:make this work
-- local function code_action_merge()
-- Test: Code action Menu
vim.keymap.set("n", "<leader>m", function()
require("tiny-code-action").code_action()
end, { noremap = true, silent = true })

View File

@ -25,10 +25,10 @@ return {
-- TODO: Try to use this without warning
opts = {
spec = {
{ "<localleader>c", group = "code" },
{ "<localleader>d", group = "debug" },
{ "<localleader>c", group = "code", mode = { "n", "v" } },
{ "<localleader>d", group = "debug", mode = { "n", "v" } },
{ "<localleader>r", icon = "󰑕", group = "Rename (COC)" },
{ "<leader>a", group = "AI" }
{ "<leader>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 = {
{ "<leader>aa", "<CMD>CodeCompanionActions<CR>", mode = { "n", "v" }, noremap = true, silent = true, desc = "CodeCompanion actions" },
{ "<leader>ai", "<CMD>CodeCompanion<CR>", mode = { "n", "v" }, noremap = true, silent = true, desc = "CodeCompanion inline" },
-- Map <leader>ai to run CodeCompanion on the selected range in normal and visual modes
{ "<leader>ai", "<CMD>'<,'>CodeCompanion<CR>", mode = { "n", "v" }, noremap = true, silent = true, desc = "CodeCompanion inline" },
{ "<leader>ac", "<CMD>CodeCompanionChat Toggle<CR>", mode = { "n", "v" }, noremap = true, silent = true, desc = "CodeCompanion chat (toggle)" },
{ "<leader>ap", "<CMD>CodeCompanionChat Add<CR>", 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<space>",
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
--