microsoft / microsoft/language-server-protocol

clarification: what response to ShowMessageRequest in edge cases?

Open
#230 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clarification show message
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

Q1. If the LSP server issues window/showMessageRequest with the actions = ['hello'], should the client show a normal Close button (in whatever way is standard for the OS, e.g. a cross to the top right) in addition to the Hello button? If the user clicks this Close glyph, then what should be sent as the result?

Q2. If the client shouldn't show a normal Close button by default, then is there any way for the LSP server to request one to be shown?

Q3. If the LSP server issues window/showMessageRequest with the actions? field set to empty, what is the result? The documentation says the result is "the selected MessageActionItem". Should the client send back an error message as soon as a request is received with empty actions field? (If so, then why is the actions field marked as optional?)

Q4. The spec says that the response to window/showMessageRequest should be "the selected MessageActionItem". If the server happened to send a MessageActionItem which contained additional fields beyond just the specified title, is the client required to parrot those extra fields back to the server too?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the LSP specification for window/showMessageRequest, MessageActionItem, and the optional actions field. Resolve the four edge cases about close controls, empty actions, and extra fields, then document the agreed behavior in the specification and verify that each question has an unambiguous answer.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.