home/rc/filetype
Johannes Altmanninger 21469c553d rc ledger: don't use region highlighter for simple keywords
As reported in
https://github.com/mawww/kakoune/issues/4685#issuecomment-1200530001
ledger.kak defines a region end that matches every character of
the buffer. This causes performance issues for large buffers.
Since the affected regions are only ever filled with a single color,
just use a regex highlighter instead of a region highlighter.
This improves performance when loading the file for the first time.

Speedup on [example.journal.txt](https://github.com/mawww/kakoune/issues/4685#issuecomment-1193243588)

	$ HOME=$PWD hyperfine -w 1 'git checkout HEAD'{~,}' -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy'
	Benchmark 1: git checkout HEAD~ -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):     362.1 ms ±   5.1 ms    [User: 336.6 ms, System: 30.2 ms]
	  Range (min … max):   352.6 ms … 369.1 ms    10 runs
	 
	Benchmark 2: git checkout HEAD -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):     271.2 ms ±  16.7 ms    [User: 252.8 ms, System: 24.0 ms]
	  Range (min … max):   253.9 ms … 305.0 ms    10 runs
	 
	Summary
	  'git checkout HEAD -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy' ran
	    1.33 ± 0.08 times faster than 'git checkout HEAD~ -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy'
2022-08-28 08:21:57 +02:00
..
arch-linux.kak
asciidoc.kak Fix AsciiDoc blocks 2021-10-17 00:19:53 +02:00
awk.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
c-family.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
cabal.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
clojure.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
cmake.kak CMake: fix comment highlight 2022-03-18 09:01:02 +01:00
coffee.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
conf.kak rc conf: treat ini files as conf if they contain a #-comment 2022-02-19 17:31:55 +01:00
coq.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
crystal.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
css.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
cucumber.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
cue.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
d.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
dart.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
dhall.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
diff.kak Remove unnecessary leading space in prompt from mappings 2022-08-01 07:37:02 +02:00
dockerfile.kak *sh.kak: do not highlight expansions if their $ is escaped 2020-09-19 08:06:46 +02:00
elixir.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
elm.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
elvish.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
erlang.kak Erlang syntax highlighting: Improved support for numeric literals, refs, ports and pids 2021-10-28 12:43:00 +05:30
eruby.kak Add missing eRuby indent group 2021-06-15 14:30:35 +02:00
etc.kak Fixed several more support files. 2019-04-10 16:48:46 -07:00
exherbo.kak Update remaining files to new provide/require format 2019-04-11 15:54:58 -07:00
fennel.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
fidl.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
fish.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
fsharp.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
gas.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
gdscript.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
gentoo-linux.kak Add gentoo linux ebuild filetype detection. 2021-08-06 11:30:06 -07:00
git.kak Merge remote-tracking branch 'adamchristiansen/gitignore-highlighting' 2022-05-10 22:36:44 +10:00
gluon.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
go.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
graphql.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
haml.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
hare.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
haskell.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
hbs.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
html.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
i3.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
ini.kak Add conf filetype, for generic Unix configuration files 2022-02-19 17:31:16 +01:00
janet.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
java.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
javascript.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
jinja.kak rc jinja: Highlight Jinja statements/expressions 2020-01-08 12:22:34 +01:00
json.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
julia.kak rc julia: add multiline comments 2021-02-21 19:20:03 +01:00
just.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
kakrc.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
kickstart.kak Update remaining files to new provide/require format 2019-04-11 15:54:58 -07:00
kotlin.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
latex.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
ledger.kak rc ledger: don't use region highlighter for simple keywords 2022-08-28 08:21:57 +02:00
lisp.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
lua.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
mail.kak Remove unnecessary leading space in prompt from mappings 2022-08-01 07:37:02 +02:00
makefile.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
markdown.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
mercurial.kak Update remaining files to new provide/require format 2019-04-11 15:54:58 -07:00
mercury.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
meson.kak meson: improve highlighting, add static words 2021-01-13 15:44:38 +01:00
mlb.kak Add highlighters for Standard ML 2020-06-23 19:22:35 +01:00
moon.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
nim.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
ninja.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
nix.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
ocaml.kak OCaml: Recognize '\"' as a char literal and not the start of a string literal 2022-05-15 11:23:06 +05:30
pascal.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
perl.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
php.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
pony.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
protobuf.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
pug.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
purescript.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
python.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
r.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
ragel.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
restructuredtext.kak rc restructuredtext: don't highlight first character of next line as code 2021-02-10 21:09:16 +01:00
ruby.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
rust.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
sass.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
scala.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
scheme.kak rc filetype: fix double space in trim-indent hooks 2022-05-26 17:08:15 +02:00
scss.kak rc filetype: fix double space in trim-indent hooks 2022-05-26 17:08:15 +02:00
sh.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
sml.kak Add highlighters for Standard ML 2020-06-23 19:22:35 +01:00
sql.kak Fix function highlighting by adding lazy instead of greedy regexp quantifier 2020-10-14 14:54:43 -06:00
svelte.kak Improve svelte highlighter 2020-11-13 00:21:05 +01:00
swift.kak rc swift: Add open and internal keywords 2021-06-24 14:29:10 +03:00
systemd.kak
taskpaper.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
terraform.kak Add filetype for terraform files with syntax hl 2019-11-18 20:41:42 +00:00
toml.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
troff.kak Add comment highlighter for troff files. 2021-02-25 20:18:10 +01:00
tupfile.kak Fixed many of the filetype support modules to not use BufSetOption to load 2019-04-09 20:54:19 -07:00
twig.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00
vhdl.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
void-linux.kak
yaml.kak Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
zig.kak Make x just select the full lines 2022-07-05 08:43:40 +10:00