Closed Konfekt closed 6 months ago
I committed 0f774f942d8dc351661d1609ada97e6e826d71b4 to address this issue. Can you try the latest plugin?
Thank you! Now we advanced one line as it spits out
Error found executing function LspOmniFunc:
line 43:
E716: Key missing in Dictionary: "omniCompleteKeyword"
# autoload/lsp/completion.vim (line 513)
var prefix = lspserver->get('omniCompleteKeyword', '')
indeed fixes the error
Error found executing function LspOmniFunc:
line 42:
E716: Key not present in Dictionary: "completeItems"
Still, instead of completing print(
to print(print
rather the popup window of the function arguments could still be shown.
I am not able to reproduce this issue with a python file and the pylsp language server. Can you attach the language server configuration, LSP plugin configuration, a sample python file and the sequence of steps to reproduce this problem?
Calling
vim --clean -u ~/.vim/viminrc
with ~/.vim/viminrc
reading
set nocompatible
language messages en_US " To avoid scrambled non english letters.
let &rtp = '~/.vim/plugged/lsp/' . ',' . &rtp
autocmd VimEnter * source ~/.vim/after/settings/lsp.vim
filetype plugin indent on
syntax on
" options go here
set hidden
with ~/.vim/after/settings/lsp.vim
reading
let lspOpts = #{
\ autoComplete: v:false,
\ }
call LspOptionsSet(lspOpts)
let lspServers = []
if filereadable($HOME . '/.local/bin/pylsp')
call add(lspServers, #{name: 'pylsp',
\ filetype: 'python',
\ path: $HOME . '/.local/bin/pylsp',
\ args: ['--check-parent-process', '--verbose']
\ })
endif
call LspAddServer(lspServers)
and typing print(<c-x><c-o>
inside a *.py
file shows the error message
Trovato errore eseguendo function LspOmniFunc:
riga 43:
E716: Chiave assente dal Dizionario: "omniCompleteKeyword"
If instead print<c-x><c-o>(<c-x><c-o>
then print(
is completed to print(print
Thanks for the detailed steps. I am able to reproduce the problem now. This is a regression caused by the PR #418. I have committed 0b9bba0ee4eaa84a75d88a0775b3b34dbf42b12d to address this issue. Can you try the latest plugin?
Thank you! Now it works without errors and does not insert text when there's nothing to complete.
After having passed
autoComplete: v:false
toLspOptionsSet()
, then in Python (or any other language using functions whose arguments are passed inside parentheses), omni-completinggives
If instead
print
is completed toprint(
, then completingprint(
completes toprint(print