You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I failed to get asyncomplete working for the longest time. I was finally able to track down the culprit and have a vimrc (debug.vimrc below) file to reproduced the issue. The problem is an autocmd which appears to conflict with asyncomplete. I tested by checking for the presence of ~/asyncomplete.log. With the autocmd present asyncomplete does not start and the log file is not there. If i comment out the autocmd everything is fine and the log file is present.
The autocmd is something I copied a long time ago and honestly I don't even know what it does any more (shame on me). I've removed it from my config but I am still curious what is going on here and was hoping something with more vim knowledge can shed some light on the situation. Perhaps it can save someone else the troubleshooting effort.
vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 13 2022 18:35:05)
macOS version - arm64
Included patches: 1-200
Compiled by Homebrew
vim9script
# vim -u debug.vimrc
set verbose=9
plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/asyncomplete.vim'
plug#end()
filetype plugin indent on
## The following autocmd breaks asyncomplete
autocmd BufEnter * {
# Prevent other buffers replacing NERDTree in its window
if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1
const buf = bufnr()
buffer #
normal! \<C-W>w
buffer buf
endif
}
g:asyncomplete_log_file = expand('~/asyncomplete.log')
imap <C-Space> <Plug>(asyncomplete_force_refresh)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I failed to get asyncomplete working for the longest time. I was finally able to track down the culprit and have a vimrc (debug.vimrc below) file to reproduced the issue. The problem is an
autocmd
which appears to conflict with asyncomplete. I tested by checking for the presence of~/asyncomplete.log
. With the autocmd present asyncomplete does not start and the log file is not there. If i comment out the autocmd everything is fine and the log file is present.The autocmd is something I copied a long time ago and honestly I don't even know what it does any more (shame on me). I've removed it from my config but I am still curious what is going on here and was hoping something with more vim knowledge can shed some light on the situation. Perhaps it can save someone else the troubleshooting effort.
Beta Was this translation helpful? Give feedback.
All reactions