Skip to content

Hover method should return null not, contents => null #300

@glennsarti

Description

@glennsarti

As per puppetlabs/puppet-vscode#742

VSCode is seeing the following when the language server returns nothing from a hover:

Hover throws an error. Intellisense isn't working either.

[2021-04-13 14:47:12.689] [exthost] [error] TypeError: Cannot read property 'kind' of null
	at asHoverContent (/home/mhj/.vscode-server/extensions/puppet.puppet-vscode-1.2.0/node_modules/vscode-languageclient/lib/protocolConverter.js:101:27)
	at asHover (/home/mhj/.vscode-server/extensions/puppet.puppet-vscode-1.2.0/node_modules/vscode-languageclient/lib/protocolConverter.js:134:31)

And debug log from editor services

---
E, [2021-04-13T14:47:12.685510 #17879] ERROR -- : (textDocument/hover) dsc_sqlsetup is not a valid puppet type, class or defined type
D, [2021-04-13T14:47:12.687138 #17879] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":5,"result":{"contents":null}}
---

As per the Language Client Spec, the LSP should return null OR a HoverResult with a non-null contents

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions