palantir / python-language-server

An implementation of the Language Server Protocol for Python
MIT License
2.61k stars 285 forks source link

pyls confuses the completion-kind of a variable with a keyword #840

Open astier opened 4 years ago

astier commented 4 years ago

pyls completion says that the kind of a variable is a keyword in this simple example:

yy = 0
y

It happens when I try to complete the last y. I could reproduce it with multiple lsps' in neovim 0.4.3. A minimal vimrc would be:

cal plug#begin($XDG_DATA_HOME.'/nvim/plugins')
    Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
    Plug 'prabirshrestha/vim-lsp'
    Plug 'mattn/vim-lsp-settings'
    Plug 'lighttiger2505/deoplete-vim-lsp'
cal plug#end()
let g:deoplete#enable_at_startup = 1
cal deoplete#custom#option({'min_pattern_length': 1})
se completeopt=menuone,noinsert

I think pyls confuses also other completion-kinds like in this issue #693

krassowski commented 3 years ago

Fixed on my fork: https://github.com/krassowski/python-language-server/pull/3 but also see https://github.com/davidhalter/jedi/issues/1752.