Skip to content

Requests vs. Notifications #7

@KillTheMule

Description

@KillTheMule

From the Roadmap:

Consider making a difference between requests and notifications, and send out notifications with the proper message type, and don't wait for a response

Does neovim actually recognize this? Read the docs! Maybe everything's a requests anyways, then don't bother
It does, see https://neovim.io/doc/user/api.html#api-global-events. Maybe not so usefull since there seems little to do where you don't want direct error feedback

So we could send out requests without a real return value, such as nvim_buf_set_lines, as notifications instead.

  • Pros:
    • This would save a bit of RPC traffic, as we don't get an answer unless there was an error
  • Cons:
    • Need to implement handling the error event
      • Needs design work: Always handle? Let clients handle it on their leisure?
      • Makes everything more complicated
    • Gets us into trouble because of timing issues, we don't know exactly which message the error event belongs to.

My take: It's not worth it.

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