forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose client creation API for pylance (#20816)
If new client change is available in pylance, made core extension to use pylance to do language server lifetime management. and also this PR removes all old notebook experiences so that it is inline with pylance (pylance already removed all those when moving client/middleware)
- Loading branch information
1 parent
b897300
commit d3dd832
Showing
15 changed files
with
156 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
import { | ||
CancellationToken, | ||
CompletionContext, | ||
CompletionItem, | ||
CompletionList, | ||
Position, | ||
TextDocument, | ||
Uri, | ||
} from 'vscode'; | ||
|
||
export interface PylanceApi { | ||
client?: { | ||
isEnabled(): boolean; | ||
start(): Promise<void>; | ||
stop(): Promise<void>; | ||
}; | ||
notebook?: { | ||
registerJupyterPythonPathFunction(func: (uri: Uri) => Promise<string | undefined>): void; | ||
registerGetNotebookUriForTextDocumentUriFunction(func: (textDocumentUri: Uri) => Uri | undefined): void; | ||
getCompletionItems( | ||
document: TextDocument, | ||
position: Position, | ||
context: CompletionContext, | ||
token: CancellationToken, | ||
): Promise<CompletionItem[] | CompletionList | undefined>; | ||
}; | ||
} |
Oops, something went wrong.