Update hlslens/scrollbar/clear search

This commit is contained in:
Daniel Lynn 2022-01-18 10:28:20 -06:00
parent 805b126491
commit 0dd12fbdd1
Signed by: daniel
GPG Key ID: 28496A140E180A9D
2 changed files with 3 additions and 49 deletions

View File

@ -11,7 +11,7 @@ endfunction
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
" Clear search highlighting
noremap <Leader><Esc> :let @/ = ""<CR>
noremap <Leader><Esc> :noh<CR>
" Spellcheck
nnoremap <Leader>S :setlocal spell! spelllang=en_us<CR>

View File

@ -1,50 +1,4 @@
lua << EOF
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
]])
require("scrollbar").setup()
require("scrollbar.handlers.search").setup()
EOF