nvim-scrollbar
nvim-scrollbar copied to clipboard
Second search example in readme not showing marks
trafficstars
Describe the bug
https://github.com/petertriho/nvim-scrollbar#search
Second example of search setup not enabling search marks on scrollbar. I added this instead of require("scrollbar.handlers.search").setup():
require("hlslens").setup({
build_position_cb = function(plist, _, _, _)
require("scrollbar.handlers.search").handler.show(plist.start_pos)
end,
})
vim.cmd([[
augroup scrollbar_search_hide
autocmd!
autocmd CmdlineLeave : lua require('scrollbar.handlers.search').handler.hide()
augroup END
]])
Version Info (please complete the following information):
NVIM v0.8.0-1210-gd367ed9b2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-10 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/cmake.config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az457-787
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
I think you may need to run the setup after loading hlslens e.g.
{
"kevinhwang91/nvim-hlslens",
config = function()
require("scrollbar.handlers.search").setup()
end,
}
@petertriho I mean example from second code block is not working, first ok:
use({
"petertriho/nvim-scrollbar",
requires = { "kevinhwang91/nvim-hlslens" },
config = function()
require("scrollbar").setup()
-- this is showing marks
-- require("scrollbar.handlers.search").setup()
-- but this is not showing marks
require("hlslens").setup({
build_position_cb = function(plist, _, _, _)
require("scrollbar.handlers.search").handler.show(plist.start_pos)
end,
})
vim.cmd([[
augroup scrollbar_search_hide
autocmd!
autocmd CmdlineLeave : lua require('scrollbar.handlers.search').handler.hide()
augroup END
]])
end,
})