arjanadriaanse / pascal-language-server

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

optional values in protocol #7

Closed arjanadriaanse closed 4 years ago

arjanadriaanse commented 4 years ago

Some values in the LSP should be optional. This partly works for object types in Pascal, which can be set to null, but not for others. One option is to use the variant type in these cases, causing type safety to be lost. Another option could be to somehow make the JSON streaming deal with these cases.

arjanadriaanse commented 4 years ago

Also, it is preferable to omit unset optional values from the resulting JSON entirely. This is also something that should be handled in the JSON streaming process.

arjanadriaanse commented 4 years ago

A possible solution is suggested here: https://lists.freepascal.org/pipermail/fpc-pascal/2020-April/057831.html