yehuohan
f65093fd13
refactor: modify hint_state structure
2022-06-21 10:49:54 +02:00
Dimitri Sabadie
04d3c37408
Fix hint_offset.
2022-06-21 10:48:57 +02:00
Dimitri Sabadie
092ab3f0ca
Fix BEFORE_CURSOR virtual edit.
...
We computed the dimming wrong because we were trying to set an extmark
in place in the buffer that doesn’t exist (the place where the
virtualedit + 1 column takes effect).
2022-06-21 10:32:09 +02:00
Dimitri Sabadie
2a4ad8c675
Optimize and fix move_cursor_to regarding hint offsets.
2022-06-21 09:51:27 +02:00
3699394
1003f22213
Add hint_offset support.
2022-06-21 09:46:21 +02:00
Dimitri Sabadie
03675eba34
Merge pull request #234 from yehuohan/multi-windows-fix
...
Fixs for multi-windows
2022-06-09 12:32:53 +02:00
Felipe Lema
cea9642387
adjust end column and bottom line for HopChar1BC
2022-04-29 17:40:21 -04:00
yehuohan
c1f1c61917
fix: Disable multi_windows when hop on visual mode
2022-04-27 00:25:12 +08:00
Hsuan-An Weng Lin
cc316d5be7
Add new HopAnywhere commands. #144
2022-01-30 18:26:51 -06:00
Dimitri Sabadie
17f67f7a3d
Fix current_line_only bug.
...
This was introduced in #205 . The way window contexts are passed around
was altered (the get_window_context() function doesn’t return the
context immediately but now returns every contexts right away, unless a
flag is passed — multi_windows = false or nil).
Also, I realized why fixing that bug that opts.multi_windows and
opts.current_line_only are unsound used together. I don’t block the
behavior (yet? it’s weird) but I notify the user not to do that.
Fixes #214 . Relates and probably fixes #213 as well.
2022-01-09 18:07:03 +01:00
yehuohan
f37e36d662
Add multi_windows support
2021-12-19 01:08:55 +08:00
Dimitri Sabadie
e5c112c355
Override opts automatically for extensions.
...
When not provided, opts will be defaulted.
Relates to #173 .
2021-11-21 10:52:10 +01:00
Dimitri Sabadie
7fb2504044
Support falling back to 1-char from 2-char mode.
...
Relates to #166 .
2021-11-17 01:07:39 +01:00
Dimitri Sabadie
e2846f246c
Add (displayed) uppercase label support.
...
Relates to #167 .
2021-11-16 20:08:00 +01:00
Dimitri Sabadie
80e9e53e4e
Fix diagnostics show/hide to only remove virt.
2021-11-16 19:44:04 +01:00
Dimitri Sabadie
10ba1fbb31
Implement callback support for hint reducing.
...
Relates to #164 .
2021-11-15 20:18:03 +01:00
Dimitri Sabadie
1a8adc0cc6
Inclusive / exclusive motion support.
...
This allows to use Hop in either the `f` way or `t` way. This is mostly
useful for operator-pending modes such as `y` and `d`.
Relates to #82 .
2021-11-15 19:17:32 +01:00
Dimitri Sabadie
b41052571c
Code hygiene.
2021-11-15 19:08:55 +01:00
Dimitri Sabadie
06e0b913e4
Revert "Revert "fix: diagnostics not greyed out on neovim nightly""
2021-11-07 18:21:57 +01:00
Dimitri Sabadie
925068d300
Revert "fix: diagnostics not greyed out on neovim nightly"
2021-11-07 17:56:42 +01:00
Dimitri Sabadie
92f7b90559
Merge pull request #157 from brphilly/fix/hide-diagnostics
...
fix: diagnostics not greyed out on neovim nightly
2021-11-05 19:50:45 +01:00
Dimitri Sabadie
af4177ecf8
Update the jump list on a sole occurrence.
...
Superseeds #162 .
2021-11-05 19:16:56 +01:00
Brady Phillips
5f02c590d7
fix: diagnostics not greyed out on neovim nightly
2021-11-02 20:44:16 +00:00
Dimitri Sabadie
da2b7bea56
Fix opts issue with extensions.
2021-11-02 16:52:35 +01:00
Dimitri Sabadie
d443d7d80a
buffer -> window in the jump targets.
2021-11-01 20:08:01 +01:00
Dimitri Sabadie
c88f5be149
Add a check to ensure Hop is initialized.
2021-11-01 12:28:45 +01:00
Dimitri Sabadie
131507ace1
Add extension support.
2021-10-31 20:43:23 +01:00
Dimitri Sabadie
720b03baee
Documentation.
2021-10-31 19:28:55 +01:00
Dimitri Sabadie
8af1839f1a
Fix dimming for current_line_only.
2021-10-31 18:02:11 +01:00
Dimitri Sabadie
f6a2fbe48a
grey_things_out renamed apply_dimming.
2021-10-31 16:55:18 +01:00
Dimitri Sabadie
1bdc291614
Use a table instead of tuples for jump targets.
2021-10-31 16:54:08 +01:00
Dimitri Sabadie
e93052884e
Add support for current-line only modes.
2021-10-31 12:38:00 +01:00
Dimitri Sabadie
a7ce250239
Rewrite most of the modes with generators.
2021-10-31 12:20:56 +01:00
Dimitri Sabadie
bb4ef4ce84
Move out window clipping from get_window_context.
...
It now lives in hop.window.clip_window_context.
2021-10-31 12:00:17 +01:00
Dimitri Sabadie
53a44c2e9a
Migrate hint_char1() to the new design.
2021-10-30 01:07:58 +02:00
Dimitri Sabadie
56ac01f94a
Migrate hint_patterns() to the new design.
2021-10-30 01:05:26 +02:00
Dimitri Sabadie
4a17e643f7
Fix weird line jump target regression.
2021-10-30 01:04:51 +02:00
Dimitri Sabadie
8fd347b663
Cleanup unused variables / refactor a bit.
2021-10-29 21:02:32 +02:00
Dimitri Sabadie
2a4ef1ba09
Refactor jump targets and introduce gen-based API.
...
Also, start removing the concept of lined jump targets.
2021-10-29 01:01:47 +02:00
Dimitri Sabadie
7e5e57af7f
Improve documentation for jump targets.
2021-10-26 11:46:36 +02:00
Dimitri Sabadie
055cf45090
Extract window context in window mod & cleanup.
2021-10-26 11:36:09 +02:00
Denis Lantsman
3c696360c3
Clean up unused vars & avoid declaring globals.
2021-10-25 18:05:57 +02:00
Dimitri Sabadie
208ec87763
Merge pull request #140 from spamwax/current-line-only
...
Add current-line only motion.
2021-10-23 13:42:39 +02:00
Dimitri Sabadie
6a0749777f
Cleanup virtual cursor magic constants.
2021-10-12 19:48:39 +02:00
Brady Phillips
8e60b4649f
Add a virtual cursor when hopping.
...
Add highlighting or a block character to show where the cursor was
before the hop was initiated.
2021-10-04 04:37:34 +01:00
Brady Phillips
6a7c19085f
Refactor grey/hints highlighting and use priority.
...
Use the priority key when creating extmarks to avoid having to grey
everything out every time the hints are refined. Also try and grey out
other virtual text and background highlights.
2021-10-04 04:34:38 +01:00
Javier López
6f34f05c82
fix: 'pat' and 'ok' were uneccesary globals
2021-09-04 20:49:18 -05:00
Hamid Ghadyani
677b60dbcc
Fix typos.
2021-08-21 14:03:50 -04:00
Hamid Ghadyani
fcd24e23f3
Add current-line only motion.
...
- HopChar1Line will only grey out current line and perform the motion
based on 1 character.
- This PR adds a new field to hint_mode table to track & preform this
current-line only mode. I couldn't find a better way of doing it
without doing rather big refactoring of the code base. And it seems
pull#123 is stalled at the moment.
2021-08-19 12:59:19 -04:00
Iago-lito
405ad15537
User can specify pattern to not be prompted. #105
2021-06-29 11:42:12 +02:00