fix(auto_preview): Instantly preview whenever another node is selected

simrat39/symbols-outline.nvim#119

Rather than using another config option, this should be the default,
expected behaviour for auto_preview.

Also (another difference to the PR implementation is that) there is no
need to subscribe to both CursorHold and CursorMoved.
This commit is contained in:
hedy
2023-11-02 20:06:06 +08:00
parent a87f73c3b2
commit bbe95d0c58
2 changed files with 3 additions and 2 deletions

View File

@@ -141,8 +141,9 @@ Key:
- ✅ Do not close outline when focus_location occurs
(#119 by M1Sports20)
- feat: instant_preview
- feat: instant_preview
(#116 by axieax)
**Superseded with an improved implementation**
- check if code_win is nill
(#110 by i3Cheese)

View File

@@ -41,7 +41,7 @@ end
local function setup_buffer_autocmd()
if config.options.auto_preview then
vim.api.nvim_create_autocmd('CursorHold', {
vim.api.nvim_create_autocmd('CursorMoved', {
buffer = 0,
callback = require('symbols-outline.preview').show,
})