feat(mini.jump): Add idle timeout to stop jumping automatically#56
Merged
echasnovski merged 4 commits intonvim-mini:mainfrom Mar 25, 2022
Merged
feat(mini.jump): Add idle timeout to stop jumping automatically#56echasnovski merged 4 commits intonvim-mini:mainfrom
echasnovski merged 4 commits intonvim-mini:mainfrom
Conversation
echasnovski
reviewed
Mar 25, 2022
echasnovski
requested changes
Mar 25, 2022
Member
echasnovski
left a comment
There was a problem hiding this comment.
This is great! Both idea and execution.
Couple of remarks:
- Please, generate documentation automatically from annotation comments. Inside Neovim run
:luafile scripts/minidoc.lua. - For a better consistency across modules, I think it is better to not introduce "timeout" notion along with "delay". The best solution here seems to make a breaking change: soft deprecate
highlight_delayand introducedelay = { highlight = 250, idle_stop = 10000000 }. This means (at least) updatingMiniJump.config(both with documentation),H.setup_config()(update validation logic and notification message if user actually suppliedhighlight_delay), and all usages ofhighlight_delay. If this feels a bit overwhelming, I am happy to do it myself (either by pushing to this PR or merging this to a different branch and continue there). If not, I am also happy to guide through this process.
Contributor
Author
|
Firstly, thank you for your kind and in-depth review, and I'm so sorry I overlooked the info about document generation. I'm sure I have made you feel uncomfortable. I made the changes you reviewed. |
Member
|
No "uncomfortable" on may end: it is a great PR with useful feature, attention to both details (apart from automatic documentation generation :) ) and code style. There is some refactoring I would like to do here, but I won't bother you with this. Thanks for PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds timeout after idle feature, inspired by lightspeed.nvim.
With this feature, you can reset highlights automatically, and start searching for another character easily.
The default value is set to
10^7, so it won't break behavior compatibility.