mirror of
https://github.com/mawww/kakoune.git
synced 2024-07-14 16:10:24 +03:00
Add rc/filetype/perf.kak for perf-report highlight
This commit is contained in:
parent
1c352e996c
commit
688e87d668
18
rc/filetype/perf.kak
Normal file
18
rc/filetype/perf.kak
Normal file
@ -0,0 +1,18 @@
|
||||
provide-module perf-report %{
|
||||
add-highlighter shared/perf-report group
|
||||
add-highlighter shared/perf-report/above_threshold regex '\b([5-9]|\d{2})\.\d+%' 0:red
|
||||
add-highlighter shared/perf-report/below_threshold regex '\b[0-4]\.\d+%' 0:green
|
||||
|
||||
|
||||
define-command -override perf-report-focus %{
|
||||
execute-keys 'xs...\d+\.\d+%<ret><a-:><a-semicolon>vtv<lt><semicolon>'
|
||||
}
|
||||
}
|
||||
|
||||
hook -group perf-report-highlight global WinSetOption filetype=perf-report %{
|
||||
require-module perf-report
|
||||
add-highlighter window/perf-report ref perf-report
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/perf-report }
|
||||
|
||||
map window normal <ret> ': perf-report-focus<ret>'
|
||||
}
|
Loading…
Reference in New Issue
Block a user