Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Use definition to indicate out-of-project files with server support #253

Closed
wants to merge 2 commits into from

Conversation

alexheretic
Copy link
Contributor

@alexheretic alexheretic commented Feb 13, 2019

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:

"dependencies": {
  "atom-languageclient": "github:alexheretic/atom-languageclient#build",
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow lsp functionality for out-of-project files clicked through to
1 participant