No horizontal scrolling for tag search | tags() and btags() can apply fzf option "--no-hscroll" in fzf_opts by default #2328
Closed
Lolligerhans
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Either apply to defaults (for all pickers or btags/tags outside outside of defaults to apply just to btags and tags: {
"ibhagwan/fzf-lua",
opts = {
defaults = {
fzf_opts = {
["--no-hscroll"] = true, -- No effect?
},
},
-- or
btags = { … },
},
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
By default,
fzf
scrolls horizontally to include the last matched section.The default
universal-ctags
tags file contains the actual tag at the start of each line.The default behavior allows scrolling the tag out of view. This happens especially when users deliberately fuzzygrep for contents that follow after the tag, like parts of a filename (".lua", "tests/", "doc/") or line ("function", "class", "local", "#define").
When scrolled horizontally, the helpfulness of the list of search results suffers dramatically.
Suggestion
Pass
"--no-hscroll"
tofzf
for thetags
andbtags
functions by default.Workaround 1
I was able to achieve the intended behavior using
fzf_opts
explicitly. I am not sure if users are supposed to setfzf_opts
.Workaround 2 attempt
I tried setting a default behavior. This attempt in LazyVim did not work:
How would this be done correctly?
Beta Was this translation helpful? Give feedback.
All reactions