vimcomplete icon indicating copy to clipboard operation
vimcomplete copied to clipboard

LSP completion only works for most recently opened filetype

Open tommy-hager opened this issue 5 months ago • 1 comments

When working with multiple buffers of different filetypes LSP completion only works for the most recently opened filetype. Currently using yegappan's vim9 LSP, and I found that the LSP's default autocompletions does work between different filetypes, however, with vimcomplete it appears to fall back to path and buffer completion.

The output of :VimCompleteCompletors shows path and buffer for older buffers, path, buffer and LSP for the most recent one. Disabling and then enabling vimcomplete on the older buffers did not seem to change this behavior.

For reference this was discovered/tested with Python, Java and Vimscript using pyright, vim-language-server, and jdtls, but it also appeared to be the case with typescript-language-server and html-language-server.

Edit: Including autocmd BufEnter * LspServer restart in my .vimrc seems to be a temporary solution, although it's likely not a perfect one.

tommy-hager avatar Sep 20 '24 16:09 tommy-hager