lexical-lsp / lexical

Lexical is a next-generation elixir language server
779 stars 77 forks source link

textDocument/definition: respond with nil result when not found #698

Closed zachallaun closed 2 months ago

zachallaun commented 2 months ago

Error responses should only be used for exceptional circumstances (e.g. a literal raised exception was caught) as opposed to "this thing wasn't found". In VS Code, for instance, error responses cause a pop-up to appear that you have to manually dismiss.

I checked all the other handlers and it looks like this was the only one still using the error response for something like this.

Fixes #697.