From 0dd12fbdd144c3f4e2469327a3802fa01b67d80d Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Tue, 18 Jan 2022 10:28:20 -0600 Subject: [PATCH] Update hlslens/scrollbar/clear search --- nvim/keybindings.vimrc | 2 +- nvim/scrollbar.vimrc | 50 ++---------------------------------------- 2 files changed, 3 insertions(+), 49 deletions(-) diff --git a/nvim/keybindings.vimrc b/nvim/keybindings.vimrc index d8de9e6..a2090ca 100644 --- a/nvim/keybindings.vimrc +++ b/nvim/keybindings.vimrc @@ -11,7 +11,7 @@ endfunction inoremap [200~ XTermPasteBegin() " Clear search highlighting -noremap :let @/ = "" +noremap :noh " Spellcheck nnoremap S :setlocal spell! spelllang=en_us diff --git a/nvim/scrollbar.vimrc b/nvim/scrollbar.vimrc index fe1e230..7be28a7 100644 --- a/nvim/scrollbar.vimrc +++ b/nvim/scrollbar.vimrc @@ -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