nwolverson / purescript-language-server

MIT License
185 stars 42 forks source link

Should optional field return null? #202

Open klarkc opened 1 year ago

klarkc commented 1 year 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 1 year 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