Closed ninth-dev closed 1 month ago
The above would work. However when viewing the opened file - LSP will no longer be enabled. ( maybe because the file is open as a scratch file? )
To ensure LSP is still enabled when viewing these files, we can simulate what Goto Defintion does.
This is how you enable LSP for your custom URI: https://github.com/sublimelsp/LSP-jdtls/blob/e723885514c765cf67d94fff21eba269f782977b/LSP-jdtls.sublime-settings#L5-L10
When using
Goto Implementation
on a dependency, we will get aUnable to Open URI
error.cats
package.Trying the same thing in with
vscode
works as intended.Some notes on how it works in
vscode
.jar
in this file.decodeFile
load the content.Possible solution
on_open_uri_async
.Here we can check if the URI starts with "jar:"
invoke the
LspMetalsFileDecoderCommand
instead of the callback.The above would work. However when viewing the opened file - LSP will no longer be enabled. ( maybe because the file is open as a scratch file? )
To ensure LSP is still enabled when viewing these files, we can simulate what Goto Defintion does.
.metals/readonly/dependencies/.....
I've got a rough implementation working. See PR #119