Update hlslens/scrollbar/clear search
This commit is contained in:
parent
805b126491
commit
0dd12fbdd1
@ -11,7 +11,7 @@ endfunction
|
|||||||
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
|
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
|
||||||
|
|
||||||
" Clear search highlighting
|
" Clear search highlighting
|
||||||
noremap <Leader><Esc> :let @/ = ""<CR>
|
noremap <Leader><Esc> :noh<CR>
|
||||||
|
|
||||||
" Spellcheck
|
" Spellcheck
|
||||||
nnoremap <Leader>S :setlocal spell! spelllang=en_us<CR>
|
nnoremap <Leader>S :setlocal spell! spelllang=en_us<CR>
|
||||||
|
@ -1,50 +1,4 @@
|
|||||||
lua << EOF
|
lua << EOF
|
||||||
require("scrollbar").setup({
|
require("scrollbar").setup()
|
||||||
handle = {
|
require("scrollbar.handlers.search").setup()
|
||||||
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
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user