arjanadriaanse / pascal-language-server

LSP server implementation for Pascal
GNU General Public License v3.0
56 stars 20 forks source link

TCompletionItem: Rename `label_` to `&label` #13

Closed Isopod closed 1 year ago

Isopod commented 3 years ago

Since label is a reserved word in Pascal, the class TCompletionItem uses label_ as a property name. Unfortunately, this means that the serialized JSON also contains the key label_ instead of label. This confuses language server clients expecting the key label. For example, completion-nvim crashes.

A simple workaround is to escape the reserved word with &. This way, the correct JSON output will be generated.