Eglot: Only handle URIs with the file:// scheme (bug#58790)
Eglot will not attempt to parse URIs that are not file:// type at all.
Instead let 'file-name-handler-alist' entries to deal with those. Not
parsing them at all allows the 'file-name-handler-alist' regexps to
identify them more accurately.
By also checking if Eglot received a URI in 'eglot--path-to-uri',
'file-name-handler-alist' can provide the non-file type URI back to
the lsp server, which presumably will know how to handle them since it
is also giving them out to clients.
This issue originated with clojure-lsp sending clients "jar:" type
URIs that Emacs is unable to handle out of the box. Before this
change, "jar:" URIs were parsed once, but since they contain a nested
URI, this resulted in a file being dispatched with a partially parsed
path that looked like "file://path/to.jar!/path/in/jar".
* lisp/progmodes/eglot.el (eglot--path-to-uri): Noop if already an
URI. (eglot--uri-to-path): Only handle file:// URIs