FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lvim/lua/user/flash.lua at main · abzcoding/lvim · GitHub
abzcoding
/
lvim
Public
Notifications
You must be signed in to change notification settings
Fork
61
Star
470
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lvim
/
lua
/
user
/
flash.lua
Copy path
More file actions
More file actions
Latest commit
History
History
History
91 lines (85 loc) · 1.86 KB
Breadcrumbs
lvim
/
lua
/
user
/
flash.lua
Copy path
File metadata and controls
91 lines (85 loc) · 1.86 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
local
M
=
{}
M
.
hop
=
function
()
local
Flash
=
require
"
flash
"
local
function
format
(
opts
)
return
{
{
opts
.
match
.
label1
,
"
FlashMatch
"
},
{
opts
.
match
.
label2
,
"
FlashLabel
"
},
}
end
Flash
.
jump
{
search
=
{
mode
=
"
search
"
},
label
=
{
after
=
false
,
before
=
{
0
,
0
},
uppercase
=
false
,
format
=
format
},
pattern
=
[[
\<
]]
,
action
=
function
(
match
,
state
)
state
:
hide
()
Flash
.
jump
{
search
=
{
max_length
=
0
},
highlight
=
{
matches
=
false
},
label
=
{
format
=
format
},
matcher
=
function
(
win
)
--
limit matches to the current label
return
vim
.
tbl_filter
(
function
(
m
)
return
m
.
label
==
match
.
label
and
m
.
win
==
win
end
,
state
.
results
)
end
,
labeler
=
function
(
matches
)
for
_
,
m
in
ipairs
(
matches
)
do
m
.
label
=
m
.
label2
--
use the second label
end
end
,
}
end
,
labeler
=
function
(
matches
,
state
)
local
labels
=
state
:
labels
()
for
m
,
match
in
ipairs
(
matches
)
do
match
.
label1
=
labels
[
math.floor
((
m
-
1
)
/
#
labels
)
+
1
]
match
.
label2
=
labels
[(
m
-
1
)
%
#
labels
+
1
]
match
.
label
=
match
.
label1
end
end
,
}
end
M
.
keys
=
{
{
"
s
"
,
mode
=
{
"
n
"
,
"
x
"
,
"
o
"
},
function
()
require
(
"
flash
"
).
jump
()
end
,
desc
=
"
Flash
"
,
},
{
"
S
"
,
mode
=
{
"
n
"
,
"
o
"
,
"
x
"
},
function
()
M
.
hop
()
end
,
desc
=
"
Flash 2Char
"
,
},
{
"
r
"
,
mode
=
"
o
"
,
function
()
require
(
"
flash
"
).
remote
()
end
,
desc
=
"
Remote Flash
"
,
},
{
"
R
"
,
mode
=
{
"
o
"
,
"
x
"
},
function
()
require
(
"
flash
"
).
treesitter_search
()
end
,
desc
=
"
Flash Treesitter Search
"
,
},
{
"
<c-s>
"
,
mode
=
{
"
c
"
},
function
()
require
(
"
flash
"
).
toggle
()
end
,
desc
=
"
Toggle Flash Search
"
,
},
}
return
M
Back
|
FazBrowse Home
|
New Git URL