Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove E1013 error when lsp sends kind=null #426

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Remove E1013 error when lsp sends kind=null #426

merged 2 commits into from
Dec 20, 2023

Conversation

girishji
Copy link
Contributor

This is what pyslp sent:
{'label': '''H''', 'data': {'doc_uri': 'file:///filename.py'},'sortText': 'a''H''', 'kind': null, 'insertText': '''H'''}
'kind' property need to be checked for null before attempting completion.

M autoload/lsp/completion.vim

This is what pyslp sent:
{'label': '''H''', 'data': {'doc_uri': 'file:///...py'},
 'sortText': 'a''H''', 'kind': null, 'insertText': '''H'''}
'kind' property need to be checked for null before
attempting completion.

M  autoload/lsp/completion.vim
@@ -263,7 +263,7 @@ export def CompletionReply(lspserver: dict<any>, cItems: any)
d.icase = 1
endif

if item->has_key('kind')
if item->has_key('kind') && !item.kind->empty()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i may think it's a bug,
'kind' should not be a 'null', and it should not be a '0' either,
you may should ask pylsp to fix it.

M  autoload/lsp/completion.vim
@yegappan yegappan merged commit dc81bb3 into yegappan:main Dec 20, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants