erlang-ls / erlang_ls

The Erlang Language Server
https://erlang-ls.github.io/
Apache License 2.0
620 stars 136 forks source link

Lowercase drive letter in URIs for Windows #1441

Closed corben2 closed 6 months ago

corben2 commented 1 year ago

Description

If a LSP client on Windows sends a capital drive letter in a URI, then the compiler diagnostics end up sending the wrong position/range.

This is because of this line. It checks that the path from the compiler matches the URI path. The path from the compiler has a lowercase drive letter, so they don't match and the diagnostics are treated as if they are coming from an include.

I've fixed this in els_uri:path, but there might be a better place to do it, I'm not sure.

plux commented 6 months ago

Thanks for your contribution @corben2 !