microsoft / language-server-protocol

Defines a common protocol for language servers.
https://microsoft.github.io/language-server-protocol/
Creative Commons Attribution 4.0 International
10.91k stars 764 forks source link

Snippet grammar fixes and minor formal improvements throughout the LSP spec #1886

Closed falko17 closed 5 months ago

falko17 commented 5 months ago

While reading through the specification, I've noticed a few style issues as well as some shortcomings in the EBNF grammar for snippets. This PR should fix them. See the list below for details on what was changed.

Detailed changes

[!NOTE] These changes have only been applied to the upcoming 3.18 LSP specification. If they should be applied to the current version 3.17, I could port the changes over as well.

[^1]: Not all the changes necessarily fix errors, some just reword certain passages to sound more natural, which may be somewhat subjective. [^2]: Technically, the text clarifying escaping rules could be removed, as the grammar already describes them now. Keeping the text for clarity's sake might still make sense, though.

falko17 commented 5 months ago

@microsoft-github-policy-service agree

dbaeumer commented 5 months ago

@falko17 thanks you so much for the great PR. Highly appreciated. I have several comments about indentation. If you are too busy to fix them I am happy to do so. I have one additional comment about the changes you did to the snippet syntax I would like to get your comment on.

falko17 commented 5 months ago

Thank you for the detailed review, @dbaeumer! I've addressed your comments, please tell me if there is anything else that should be done. Also, sorry about all the indentation problems, my editor displayed tabs as 2 spaces, which is why I didn't catch these. Should be all fixed now.