mirror of
https://github.com/jiriks74/presence.nvim
synced 2025-07-17 14:58:48 +02:00
Move autocmd to autoload and validate setup opts
This commit is contained in:
parent
a656ba5361
commit
f3151560a7
3 changed files with 37 additions and 15 deletions
autoload
9
autoload/presence.vim
Normal file
9
autoload/presence.vim
Normal file
|
@ -0,0 +1,9 @@
|
|||
" Define autocommands to handle auto-update events
|
||||
function presence#SetAutoCmds()
|
||||
augroup presence_events
|
||||
autocmd!
|
||||
if exists("g:presence_auto_update") && g:presence_auto_update
|
||||
autocmd BufRead * lua package.loaded.presence:update()
|
||||
endif
|
||||
augroup END
|
||||
endfunction
|
Loading…
Add table
Add a link
Reference in a new issue