高亮当前文件所有引用

This commit is contained in:
caprain 2026-05-11 21:19:40 +08:00
parent 1cb5843449
commit 8eacffaa83
3 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,16 @@
-- === 插件描述 ===
if vim.g.vscode then return end
vim.keymap.set(
"n",
"g=",
"<cmd>lua require('illuminate').goto_next_reference(true)<cr>",
{ noremap = true, silent = true, desc = "Go to next reference" }
)
-- 将光标移动到上一个引用
vim.keymap.set(
"n",
"g-",
"<cmd>lua require('illuminate').goto_prev_reference(true)<cr>",
{ noremap = true, silent = true, desc = "Go to previous reference" }
)

View file

@ -22,6 +22,8 @@ local specs = {
'https://github.com/lukas-reineke/indent-blankline.nvim',
-- rainbowdelimiters.lua 彩虹括号
'https://github.com/HiPhish/rainbow-delimiters.nvim',
-- illuminate.lua 高亮所有引用
'https://github.com/RRethy/vim-illuminate',
-- gitsigns.lua 突出增、删、改过的行
'https://github.com/lewis6991/gitsigns.nvim',
-- ufo.lua 折叠插件

View file

@ -121,6 +121,10 @@
"rev": "0e6d41d55ad147407e4ba00a292973de8db0b836",
"src": "https://github.com/jiaoshijie/undotree"
},
"vim-illuminate": {
"rev": "0d1e93684da00ab7c057410fecfc24f434698898",
"src": "https://github.com/RRethy/vim-illuminate"
},
"vim-suda": {
"rev": "c492741b4679b3cdd4d9e34138209784e061d916",
"src": "https://github.com/lambdalisue/vim-suda"