nwolverson / purescript-language-server

MIT License
183 stars 41 forks source link

Should optional field return null? #202

Open klarkc opened 9 months ago

klarkc commented 9 months ago

I was attempting to trace the root cause of mattn/vim-lsp-settings#692, and I found that purescript-language-server is returning null values for optional fields (like documentChanges). Is this intended, and should the LSP client handle null as optional fields?

nwolverson commented 9 months ago

Yeah I imagine these should be absent rather than null, not sure if this is the lsp server itself or the library used. We should probably be using undefined instead of null in the representation, if that works out the same as absent by the time it gets to the wire