mirror of
https://github.com/NotAShelf/specs.nvim.git
synced 2024-12-27 05:02:24 +00:00
Implement 'winhl' user option
This commit is contained in:
parent
5a6c375b80
commit
ba3471c804
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue