Skip to content

[textDocument/hover] Allow null response #292

@MaskRay

Description

@MaskRay
  • Reproduction steps (from clean state)
    1. :call LanguageClient_textDocument_hover()
    2. server returns null
    3. LanguageClient-neovim errors invalid type: null, expected struct Hover

/tmp/LanguageClient.log

2018-01-21T00:12:39.897253168-08:00 ERROR languageclient::languageclient - Error handling message. Message: {"id": 13, "jsonrpc": "2.0", "method": "textDocument/hover", "params": {"character": 11, "handle": true, "languageId": "cpp", "line": 12, "buftype": "", "filename": "/tmp/d/a.cc"}}. Error: Err(ErrorImpl { code: Message("invalid type: null, expected struct Hover"), line: 0, column: 0 })

Actual traffic:

read Dev/Util/cquery/build/debug/bin/cquery
{"jsonrpc":"2.0","method":"textDocument/hover","params":{"position":{"character":3,"line":9},"textDocument":{"uri":"file:///tmp/d/a.cc"}
},"id":40}
write Dev/Util/cquery/build/debug/bin/cquery
{"jsonrpc":"2.0","id":40,"result":null}

This is annoying for au CursorMoved * if b:Plugin_LanguageClient_started | call LanguageClient_textDocument_hover() | endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions