microsoft / microsoft/language-server-protocol
Clarification on order of operations when executeCommand results in multiple applyEdits
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
This is a question related to #2002
Two questions, really:
- Is there a server that would ever produce more than a single applyEdit on executeCommand?
- What is the exact order of operations?
To elaborate on the second, my client does this:
- Send
executeCommandrequest - Receive
applyEdit - Respond to
applyEdit - Receive
executeCommandresponse - Assert that there was at most one
applyEdit - Actually apply the edit and send change notifications.
I could aggregate more applyEdits and apply them all at once, i.e.
- Send
executeCommandrequest - Receive
applyEdit - Respond to
applyEdit - Receive another
applyEdit - Respond to that
- Receive
executeCommandresponse - Actually apply the edits and send change notifications.
But I'm assuming that the intention was:
- Send
executeCommandrequest - Receive
applyEdit - Apply it.
- Send change notification.
- Respond to
applyEdit - Repeat 2, 3, 4, 5
- Receive
executeCommandresponse
Only, there I have not clue what should come first - the change notification or the applyEdit response.
Once again, having a server to test against would be crucial in order for me to implement this kind of thing.
All the servers I've come across either produced 1 or 0 applyEdits on executeCommand.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read issue #2002 and the executeCommand/applyEdit protocol definitions first. Resolve whether multiple applyEdit requests are allowed and document the required sequencing of edit application, change notifications, and responses, including a reproducible server case if available.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100