Language servers can support out of project files, ie RLS dependencies which cargo puts somewhere in ~/.cargo/. However, currently ide-rust cannot support any LSP functionality for dependency sources or the rust std library because atom-languageclient does not know these files may be of interest to the RLS.
This change optionally uses textDocument/definition responses to imply a server's support of the returned out-of-project source directories.
When matching a the editor's file path to a server these implications are taken into account if we cannot otherwise find a server from the path.
The method serversSupportDefinitionDestinations(): boolean is overridden by the client concrete class to opt into this behaviour.
Fixes #244
Using this technique is very effective for ide-rust
Language servers can support out of project files, ie RLS dependencies which cargo puts somewhere in
~/.cargo/
. However, currently ide-rust cannot support any LSP functionality for dependency sources or the rust std library because atom-languageclient does not know these files may be of interest to the RLS.This change optionally uses
textDocument/definition
responses to imply a server's support of the returned out-of-project source directories.When matching a the editor's file path to a server these implications are taken into account if we cannot otherwise find a server from the path.
The method
serversSupportDefinitionDestinations(): boolean
is overridden by the client concrete class to opt into this behaviour.Fixes #244
Using this technique is very effective for ide-rust
This feature is also available in my fork: