1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

update nvim-hlslens settings

This commit is contained in:
jdhao 2021-12-11 15:46:25 +08:00
parent 6fb30f0cf2
commit a466339092
3 changed files with 23 additions and 11 deletions

View File

@ -37,15 +37,6 @@ let g:semshi#error_sign=v:false
"""""""""""""""""""""""""" vlime settings """"""""""""""""""""""""""""""""
command! -nargs=0 StartVlime call jobstart(printf("sbcl --load %s/vlime/lisp/start-vlime.lisp", g:package_home))
""""""""""""""""""""""""""""" settings for nvim-hlslens"""""""""""""""
noremap <silent> n <Cmd>execute('normal! ' . v:count1 . 'nzzzv')<CR>
\<Cmd>lua require('hlslens').start()<CR>
noremap <silent> N <Cmd>execute('normal! ' . v:count1 . 'Nzzzv')<CR>
\<Cmd>lua require('hlslens').start()<CR>
map * <Plug>(asterisk-z*)<Cmd>lua require('hlslens').start()<CR>
map # <Plug>(asterisk-z#)<Cmd>lua require('hlslens').start()<CR>
"""""""""""""""""""""""""""""LeaderF settings"""""""""""""""""""""
" Do not use cache file
let g:Lf_UseCache = 0

16
lua/config/hlslens.lua Normal file
View File

@ -0,0 +1,16 @@
vim.api.nvim_set_keymap(
"n",
"n",
"<Cmd>execute('normal! ' . v:count1 . 'nzzzv')<CR><Cmd>lua require('hlslens').start()<CR>",
{ noremap = true, silent = true }
)
vim.api.nvim_set_keymap(
"n",
"N",
"<Cmd>execute('normal! ' . v:count1 . 'Nzzzv')<CR><Cmd>lua require('hlslens').start()<CR>",
{ noremap = true, silent = true }
)
vim.api.nvim_set_keymap("n", "*", "<Plug>(asterisk-z*)<Cmd>lua require('hlslens').start()<CR>", { silent = true })
vim.api.nvim_set_keymap("n", "#", "<Plug>(asterisk-z#)<Cmd>lua require('hlslens').start()<CR>", { silent = true })

View File

@ -85,8 +85,13 @@ require("packer").startup({
-- Clear highlight search automatically for you
use({"romainl/vim-cool", event = "VimEnter"})
-- Show match number for search
use {'kevinhwang91/nvim-hlslens', branch = 'main', event = "VimEnter"}
-- Show match number and index for searching
use {
'kevinhwang91/nvim-hlslens',
branch = 'main',
keys = {{'n', '*'}, {'n', '#'}, {'n', 'n'}, {'n', 'N'}},
config = [[require('config.hlslens')]]
}
-- Stay after pressing * and search selected text
use({"haya14busa/vim-asterisk", event = 'VimEnter'})