diff --git a/README.md b/README.md index dff2caf..e33fd05 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Show where your cursor moves when jumping large distances (e.g between windows). Fast and lightweight, written completely in Lua. WIP. ![demo](https://user-images.githubusercontent.com/28115337/111098526-90923e00-853b-11eb-8e7c-c5892d64c180.gif) + +New: added option for custom highlighting for popup: +![demo2](https://user-images.githubusercontent.com/28115337/112231882-7b01d000-8c2f-11eb-9f06-e6e6e492a533.gif) + ## Install Using [packer.nvim](https://github.com/wbthomason/packer.nvim): ```lua @@ -22,6 +26,7 @@ require('specs').setup{ inc_ms = 10, blend = 10, width = 10, + winhl = "PMenu", fader = require('specs').linear_fader, resizer = require('specs').shrink_resizer } diff --git a/lua/specs/init.lua b/lua/specs/init.lua index 68fb152..bedf27a 100644 --- a/lua/specs/init.lua +++ b/lua/specs/init.lua @@ -26,8 +26,11 @@ function M.show_specs() row = cursor_row, style = 'minimal' }) + vim.api.nvim_win_set_option(win_id, 'winhl', 'Normal:'.. opts.popup.winhl) vim.api.nvim_win_set_option(win_id, "winblend", opts.popup.blend) + + local cnt = 0 local config = vim.api.nvim_win_get_config(win_id) local timer = vim.loop.new_timer() @@ -123,6 +126,7 @@ local DEFAULT_OPTS = { inc_ms = 5, blend = 10, width = 20, + winhl = "PMenu", fader = M.exp_fader, resizer = M.shrink_resizer }