Skip to content

Commit

Permalink
fix: remove supportsDefinitionsForAdditionalPaths function
Browse files Browse the repository at this point in the history
This check is not necessary
  • Loading branch information
aminya committed Jun 10, 2021
1 parent e19875f commit 500d2d0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lib/auto-languageclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,11 @@ export default class AutoLanguageClient {
point
)

if (query !== null && this.supportsDefinitionsForAdditionalPaths && server.additionalPaths !== undefined) {
if (query !== null && server.additionalPaths !== undefined) {
/*
* Indicates that the language server can support LSP functionality for out of project files indicated by
* `textDocument/definition` responses.
*/
for (const def of query.definitions) {
considerAdditionalPath(server as ActiveServer & { additionalPaths: Set<string> }, path.dirname(def.path))
}
Expand Down Expand Up @@ -998,14 +1002,6 @@ export default class AutoLanguageClient {
.forEach((line) => this.logger.warn(`stderr ${line}`))
}

/**
* Indicates that the language server can support LSP functionality for out of project files indicated by
* `textDocument/definition` responses. Set it to `true` if the server supports this feature.
*
* @default `false`
*/
protected supportsDefinitionsForAdditionalPaths: boolean = false

private getServerAdapter<T extends keyof ServerAdapters>(
server: ActiveServer,
adapter: T
Expand Down

0 comments on commit 500d2d0

Please sign in to comment.