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.
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.