diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-15 15:56:39 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-15 15:56:39 +0100 |
commit | b0d114d210156fedd4a359a0820edfb2397337a9 (patch) | |
tree | f53e0db8ffbef65827901575d3c2292db547354c /lua/config | |
parent | c46c1ba6cf1517daa5c1fd03c42b2cf058228f5d (diff) |
Add lightspeed
Diffstat (limited to 'lua/config')
-rw-r--r-- | lua/config/init.lua | 1 | ||||
-rw-r--r-- | lua/config/lightspeed.lua | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/lua/config/init.lua b/lua/config/init.lua index c5b6147..aab217b 100644 --- a/lua/config/init.lua +++ b/lua/config/init.lua @@ -16,6 +16,7 @@ require("config.impatient") require("config.alpha") require("config.whichkey") require("config.autocommands") +require("config.lightspeed") require("config.zen") require("config.spectre") require("config.colorizer") diff --git a/lua/config/lightspeed.lua b/lua/config/lightspeed.lua new file mode 100644 index 0000000..f7878df --- /dev/null +++ b/lua/config/lightspeed.lua @@ -0,0 +1,31 @@ +-- For navigating source files. + +local status_ok, lightspeed = pcall(require, "lightspeed") +if not status_ok then + return +end + +lightspeed.setup({ + ignore_case = false, + exit_after_idle_msecs = { unlabeled = 1000, labeled = nil }, + + --- s/x --- + jump_to_unique_chars = { safety_timeout = 400 }, + match_only_the_start_of_same_char_seqs = true, + force_beacons_into_match_width = false, + -- Display characters in a custom way in the highlighted matches. + substitute_chars = { ["\r"] = "¬" }, + -- Leaving the appropriate list empty effectively disables "smart" mode, + -- and forces auto-jump to be on or off. + safe_labels = { ... }, + labels = { ... }, + -- These keys are captured directly by the plugin at runtime. + special_keys = { + next_match_group = "<space>", + prev_match_group = "<tab>", + }, + + --- f/t --- + limit_ft_matches = 4, + repeat_ft_with_target_char = false, +}) |