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

update hlslens conf

This commit is contained in:
jdhao 2022-04-29 22:00:10 +08:00
parent 4b4331d394
commit 3817525441

View File

@ -3,9 +3,11 @@ require('hlslens').setup({
nearest_only = true,
})
local activate_hlslens = function(d)
local cmd = "normal! " .. vim.v.count1 .. d .. "zzzv"
local activate_hlslens = function(direction)
local cmd = string.format("normal! %s%szzzv", vim.v.count1, direction)
local status, msg = pcall(vim.fn.execute, cmd)
-- 13 is the index where real error message starts
msg = msg:sub(13)
if not status then
vim.api.nvim_echo({{msg, "ErrorMsg"}}, false, {})