Scrollbar setup

This commit is contained in:
Daniel Lynn 2022-01-07 12:37:58 -06:00
parent fbcf1643d6
commit 5667f59c6f
Signed by: daniel
GPG Key ID: 655C07B9B3DDC88B

View File

@ -1,3 +1,50 @@
lua << EOF
require('scrollbar').setup()
require("scrollbar").setup({
handle = {
text = " ",
color = "white",
},
marks = {
Search = { text = { "-", "=" }, priority = 0, color = "orange" },
Error = { text = { "-", "=" }, priority = 1, color = "red" },
Warn = { text = { "-", "=" }, priority = 2, color = "yellow" },
Info = { text = { "-", "=" }, priority = 3, color = "blue" },
Hint = { text = { "-", "=" }, priority = 4, color = "green" },
Misc = { text = { "-", "=" }, priority = 5, color = "purple" },
},
excluded_filetypes = {
"",
"prompt",
"TelescopePrompt",
},
autocmd = {
render = {
"BufWinEnter",
"TabEnter",
"TermEnter",
"WinEnter",
"CmdwinLeave",
"TextChanged",
"VimResized",
"WinScrolled",
},
},
handlers = {
diagnostic = true,
search = true,
},
})
require("hlslens").setup({
build_position_cb = function(plist, bufnr, changedtick, pattern)
require('scrollbar').search_handler.show(plist.start_pos)
end
})
vim.cmd([[
augroup scrollbar_search_hide
autocmd!
autocmd CmdlineLeave : lua require('scrollbar').search_handler.hide()
augroup END
]])
EOF