Skip to content

onNotification can only have one event handler per type - consider allowing multiple? #299

@CRogers

Description

@CRogers

I spent a large chunk of time today tracking down a bug I'd introduced; it looks like LanguageClient#onNotification can only have one handler per notification type, and silently overwrites the old handler when given a new one:

https://github.com/Microsoft/vscode-languageserver-node/blob/fd152c3961eea1a74547932d157d7351764c1dbf/jsonrpc/src/main.ts#L898

This goes very much against what I'd expect to be able to do, which is to register multiple handlers for the same notification type.

In particular, I'm trying to add vscode decorations for haskell "typed holes" which are hacked into the haskell compiler as error messages but need a faster feedback than hovering the mouse:

screen shot 2018-01-02 at 11 02 19 pm

I want to augment the existing error reporting provided by the default vscode language client implementation but can't do it without removing that default publish diagnostic handler at the moment :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    info-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions