ggandor / lightspeed.nvim

deprecated in favor of leap.nvim
MIT License
1.56k stars 28 forks source link

Matching Issues #165

Closed graciasc closed 2 years ago

graciasc commented 2 years ago

Description

I'm not getting an identifier to go to the second matching string. Is this a bug ? or I'm not understanding something.


-------------------
--lightspeed.nvim 
-- NOTE: This is just illustration - there is no need to copy/paste the
-- defaults, or call `setup` at all, if you do not want to change anything.

require("lightspeed").setup {
  ignore_case = false,
  exit_after_idle_msecs = { unlabeled = nil, 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,
}

--------------------
-- init.lua
  ["ggandor/lightspeed.nvim"] = {
    requires = { "tpope/vim-repeat" },
    config = function()
      require "custom.configs.lightspeed"
    end,
  },
CleanShot 2022-09-10 at 19 32 53@2x
ggandor commented 2 years ago

You've emptied out both label lists:

safe_labels = {},
labels = {},

The original looks like

safe_labels = { . . . },
labels = { . . . },

Meaning both list are filled with labels by default, just omitted here (i.e., in the Readme) for the sake of brevity. No need to put those in your config if you don't want to change the defaults.

graciasc commented 2 years ago

Okay that makes sense. Looks like it's working with just the default import.

 ["ggandor/lightspeed.nvim"] = {
    requires = { "tpope/vim-repeat" },
    config = function()
      require "lightspeed"
    end,
  },
CleanShot 2022-09-11 at 09 23 50@2x