Files
lua-nvim/lua/cargdev/plugins/precognition.lua

42 lines
1.6 KiB
Lua

-- ============================================================================
-- PRECOGNITION: Vim motion hints and navigation helper
-- ============================================================================
-- Displays virtual text hints showing where motion keys (w, b, e, W, B, E,
-- ^, $, 0, %) will take you, helping learn and improve Vim navigation.
-- Also shows gutter hints for vertical motions (gg, G, {, }).
-- Starts hidden by default, can be toggled on demand.
-- Keymaps: <leader>vp (toggle), <leader>vP (peek)
-- ============================================================================
return {
"tris203/precognition.nvim",
event = "VeryLazy",
opts = {
startVisible = false,
showBlankVirtLine = true,
highlightColor = { link = "Comment" },
hints = {
Caret = { text = "^", prio = 2 },
Dollar = { text = "$", prio = 1 },
MatchingPair = { text = "%", prio = 5 },
Zero = { text = "0", prio = 1 },
w = { text = "w", prio = 10 },
b = { text = "b", prio = 9 },
e = { text = "e", prio = 8 },
W = { text = "W", prio = 7 },
B = { text = "B", prio = 6 },
E = { text = "E", prio = 5 },
},
gutterHints = {
G = { text = "G", prio = 10 },
gg = { text = "gg", prio = 9 },
PrevParagraph = { text = "{", prio = 8 },
NextParagraph = { text = "}", prio = 8 },
},
},
keys = {
{ "<leader>vp", "<cmd>lua require('precognition').toggle()<cr>", desc = "Toggle Precognition" },
{ "<leader>vP", "<cmd>lua require('precognition').peek()<cr>", desc = "Peek Precognition" },
},
}