1
0
Fork 0
mirror of https://github.com/jiriks74/presence.nvim synced 2024-12-29 19:32:05 +01:00
presence.nvim/autoload/presence.vim
vhyrro 9fd2a30127
Add the ability to show the current line number in presence (#16)
* fix: rewrite for latest commit
* fix: formatting
* fix: use BufEnter instead of BufRead for more stable presence updates
* fix: change vimscript variable from false to 0
Co-authored-by: Andrew Kwon <andrewshky@gmail.com>
* fix: revert back to TextChanged rather than InsertEnter, refactor bits of the codebase
* fix: formatting
* fix: luacheck error and compare options to numeric values rather than booleans
Co-authored-by: Andrew Kwon <andrewshky@gmail.com>
2021-05-22 12:46:41 -07:00

11 lines
468 B
VimL

" 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 BufEnter * lua package.loaded.presence:update()
autocmd TextChanged * lua package.loaded.presence:update(nil, true)
autocmd VimLeavePre * lua package.loaded.presence:unregister_self()
endif
augroup END
endfunction