/ˌpriːkɒɡˈnɪʃn/ noun
- foreknowledge of an event, especially as a form of extrasensory perception.
precognition.nvim assists with discovering motions (Both vertical and horizontal) to navigate your current buffer
Installation with any package manager, Lazy example below:
return {
"tris203/precognition.nvim",
config = {
-- startVisible = true,
-- showBlankVirtLine = true,
-- highlightColor = "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 = {
-- -- prio is not currently used for gutter hints
-- G = { text = "G", prio = 1 },
-- gg = { text = "gg", prio = 1 },
-- PrevParagraph = { text = "{", prio = 1 },
-- NextParagraph = { text = "}", prio = 1 },
-- },
},
}
- Items can be hidden by settings their priority to 0, if you want to hide the
entire virtual line. Set all elements to
prio = 0
in combination with the below. showBlankVirtLine = false
Setting this option will mean that if a Virtual Line would be blank it wont be rendered
The hints can be toggled on and off with
:lua require("precognition").toggle()
The hints can be peeked, this means that the hint will be show until the next cursor movement.
:lua require("precognition").peek()
This plugin supports stable and nightly. >0.9 at the time of writing.
Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion to improve the plugin, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
If there is something specific you want to work on then, please open an issue/discussion first to avoid duplication of efforts If you have found a bug please open an issue, or submit a PR with a failing test.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request