mohsen
31e0e42e62
refactor!: fix lint errors ( #17 )
...
* refactor!: fix lint errors
update deprecated api calls
* refactor!: update minimum nvim version to 9.0
2023-06-22 10:27:28 +00:00
mohsen
e901f60d2f
refactor:added type annotation and minor refactors
2023-06-08 18:21:15 +03:30
mohsen
74c240cabc
feat:show jump hints as inline text
2023-06-07 16:53:39 +03:30
mohsen
ba390f2ee5
chore:added stylua config
2023-06-07 10:22:48 +03:30
Dimitri Sabadie
39a18f21f7
Fix column out of range for HopLine*.
...
This commit has the disavantage of preventing people from jumping to
empty lines if they have shifted their view. However, I think it’s okay
because we cannot place a hint in a buffer that is not visible, unless
we start hacking around with the text_column thing, and I don’t think
it’s worth it for now.
Fixes #292 .
2022-10-09 13:54:53 +02:00
yehuohan
a84e8b1991
Add preview support for HopPattern
...
With this feature, we can also cancel HopPattern with <Esc> and <C-c>.
2022-06-21 10:49:54 +02:00
Zhanibek Adilbekov
8ac8b914da
Added new option to select hint position in match.
...
For example, now you can use this command to hint word endings:
```lua
:lua require"hop".hint_words({hint_position = require"hop.hint".HintPosition.END})
```
2022-04-05 07:10:23 +06:00
Christian Clason
b33e02f8c6
fix: don't rely on implicit nil->0 conversion in Neovim API
2022-01-04 17:32:45 +01:00
Dimitri Sabadie
c34a269ed1
Allow not to provide indirect_jump_targets.
...
This will default to using `jump_targets` as if they were already
ordered.
Relates to #173 .
2021-11-21 12:05:22 +01:00
Dimitri Sabadie
e2846f246c
Add (displayed) uppercase label support.
...
Relates to #167 .
2021-11-16 20:08:00 +01: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
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
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
Tae Sandoval
4379e58e50
Make hop.hint_word depend on iskeyword
...
By using \k, which depends on the iskeyword value, hop.hint_word
behaviour's becomes consistent with all the native words' commands, like
* and [i.
2021-07-05 23:37:24 +02:00
Iago-lito
4f7bce3fd1
Fix a couple of typos.
2021-06-27 11:23:33 +02:00
Iago-lito
8516112c4b
Add support for HopLineStart. #106
...
Implement easy case with no hint-mode state. Blank lines are skipped over.
2021-06-27 11:21:03 +02:00
Dimitri Sabadie
7bb6ce10d4
Fix column computation for empty lines.
...
Relates to #100 .
2021-06-23 20:57:59 +02:00
Dimitri Sabadie
d9c15b1d32
Update documentation and remove unused options.
...
`winblend` was removed as it wasn’t used anymore.
2021-06-19 14:56:17 +02:00
Dimitri Sabadie
aff46fba7a
Implement full before / after cursor variation.
...
Allows to hint lines by respecting a before / after hint mode. The
first / last line will be truncated accordingly.
Relates to #71 , #91 .
2021-06-19 02:41:17 +02:00
Dimitri Sabadie
9677a948ce
Fix truncated hints after unicode in wrap mode.
...
If some unicode / multi-byte is present at column `col` on a given line
and that `wrap` is set, then after `col`, some hints will be truncated.
This was implemented in the first place to hint _only_ what’s visible
(so that we don’t waste time hinting stuff the user cannot even see). In
the case of `wrap` mode, the computation of what’s visible was buggy.
This commit patches this situation by converting the width into a byte
width, allowing to take into unicode and more specifically, multi-byte
fucking characters. Should work with emojis, too.
Relates to #72 .
2021-06-03 00:38:19 +02:00
Dimitri Sabadie
79b8a8a1ed
Fix unicode key set.
...
Unicode keys can now be used completely. The initial algorithm wasn’t
tested though and is going to be ruled out entirely soon, so no need to
fix it — and it’s weaker anyway.
Relates to #73 . Might relate to #72 but do not expect this commit to fix
it, though.
2021-06-03 00:22:19 +02:00
Dimitri Sabadie
1b671654c1
Add support for smartcase.
2021-03-28 04:18:29 +02:00
Dimitri Sabadie
872bb18ee3
Add support for case-insensitive input patterns.
...
Relates to #32 .
2021-03-23 19:21:38 +01:00
Dimitri Sabadie
a570462b14
Fix HopPattern / HopLine.
2021-03-17 21:27:29 +01:00
Dimitri Sabadie
240aee6714
Update documentation and remove unneeded arguments.
2021-03-14 16:49:51 +01:00
Dimitri Sabadie
fef80dcb0f
Add the TrieBacktrackFilling permutation algorithm and use it as default.
2021-03-14 15:57:41 +01:00
Dimitri Sabadie
111f9e70e4
Refactor permutation code.
2021-03-14 02:47:01 +01:00
Dimitri Sabadie
4692a658a6
Add support for extended-marks and jump_on_sole_occurrence.
2021-03-06 16:38:49 +01:00
Dimitri Sabadie
b844a533d6
Do not open Hop when there’s no match.
...
Relates to #25 .
2021-02-26 13:02:21 +01:00
Dreomite
37618c7edc
Escape special characters in char searches
2021-02-25 22:23:06 +03:00
Dreomite
225e2fcca3
Make setting opts more versatile
...
* It's now possible to partially set local opts
* Default opts are always used as a fallback, preventing some crashes
2021-02-23 18:44:55 +03:00
Dimitri Sabadie
f7a4070b7f
Introduce hop.setup.
...
Relates to #19 .
2021-02-20 23:20:09 +01:00
Dimitri Sabadie
843c5a2a33
Add hint_lines.
2021-02-16 00:56:57 +01:00
Dimitri Sabadie
f23112e27c
Refactor the hint code.
...
We will be able to add more modes easily from now on.
2021-02-16 00:17:51 +01:00
Dimitri Sabadie
d9471b79d7
Rename jump_words() hint_words() and add hint_patterns().
2021-02-11 17:45:56 +01:00
Dimitri Sabadie
77eaff622a
Update documentation.
2021-02-11 00:32:05 +01:00
Dimitri Sabadie
2dda2cf32f
Fix wrap and nowrap buffers.
2021-02-11 00:26:22 +01:00
Dimitri Sabadie
83938ba120
Fix simple utf character bug when shifting window in nowrap.
2021-02-10 03:15:27 +01:00
Dimitri Sabadie
991bc77a8a
Fix nowrap windowing shifting hinting.
2021-02-10 02:40:57 +01:00
Dimitri Sabadie
96087cb76a
Switch from vroom -> hop.nvim.
2021-02-08 00:25:58 +01:00