-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some refactor on hop #58
Conversation
…osition computation less confused
…g to hop framework
Hi! I had a quick look and it seems very good.All your proposed changes improve the code base and made it more consistent. Well done 👍. Only problem is dimming unmatched lines is broken. for example
|
@smoka7 My careless for dimming area. I refactored dimming related code, and now By the way, do you have any idea about what's the purpose of the With |
Nvim hides the cursor when it waits for user input while running
Yes it happens on empty lines, it might be an Nvim issue. I think it's better to make it optional with default to |
Hop has beautiful and readable code with comment string for types. And this PR is to make some refactor to make hop better:
WindowRow
,WindowCol
,WindowCell
andWindowChar
to make hop position computation less confusedjump_regex.lua
to makejump_target.lua
thinjump_target.move_jump_target
to computehint_offset
(according to hop's comment, I thinkhint_offset
wants to make offset by visible cells)hop_helpers.lua
to provide test functions for hopMatchContext
and makeJumpContext
thin (I think completeJumpContext
andOptions
passed toRegex.match
is better for hop-extension developement)clip_line_context
and makejump_targets_by_scanning_lines
thinjump_target_generator
to make creatingLocations
more easily and provide hop-extension ability to produce customWindowContext[]
This is not a feature PR, but is to provide more typed and readable code instead.
@smoka7 Are you willing to review this PR?