Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting for supporting pylance handling notebook intellisense #8140

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

rchiodo
Copy link
Contributor

@rchiodo rchiodo commented Nov 2, 2021

Fixes #8076

Modify creation of the middleware portion to use the 'pylance' middleware based on a setting. Prerequisite for pylance to start on their own version of notebook intellisense

@rchiodo rchiodo requested a review from a team as a code owner November 2, 2021 21:40
@rchiodo
Copy link
Contributor Author

rchiodo commented Nov 2, 2021

/cc @jakebailey @heejaechang @bschnurr

private onDidChangeConfiguration(event: ConfigurationChangeEvent) {
if (
event.affectsConfiguration('jupyter.pylanceHandlesNotebooks') ||
event.affectsConfiguration('python.languageServer')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably doesn't matter, but feasibly someone could change from "Pylance" to "Default" or vice versa, in which case the config changes from VS Code's view, but under the hood, the Python extension does nothing.

I doubt it really matters, but thought I'd mention.

@codecov-commenter
Copy link

Codecov Report

Merging #8140 (cdd3991) into main (0bfb8f8) will decrease coverage by 0%.
The diff coverage is 68%.

@@          Coverage Diff          @@
##            main   #8140   +/-   ##
=====================================
- Coverage     71%     71%   -1%     
=====================================
  Files        366     366           
  Lines      22689   22606   -83     
  Branches    3445    3418   -27     
=====================================
- Hits       16266   16197   -69     
+ Misses      5012    5010    -2     
+ Partials    1411    1399   -12     
Impacted Files Coverage Δ
src/client/common/types.ts 100% <ø> (ø)
...ence/notebook/intellisense/intellisenseProvider.ts 83% <63%> (-4%) ⬇️
...atascience/notebook/intellisense/languageServer.ts 70% <71%> (-2%) ⬇️
src/client/common/configSettings.ts 86% <100%> (+<1%) ⬆️
.../datascience/jupyter/kernels/cellExecutionQueue.ts 90% <0%> (-5%) ⬇️
src/client/datascience/jupyter/kernels/kernel.ts 75% <0%> (-4%) ⬇️
src/client/datascience/jupyter/jupyterExecution.ts 61% <0%> (-3%) ⬇️
src/client/common/application/webviews/webview.ts 73% <0%> (-2%) ⬇️
...datascience/interactive-common/notebookProvider.ts 72% <0%> (-2%) ⬇️
...lient/datascience/jupyter/liveshare/serverCache.ts 78% <0%> (-2%) ⬇️
... and 17 more

@rchiodo rchiodo merged commit 350a17c into main Nov 2, 2021
@rchiodo rchiodo deleted the rchiodo/allow_pylance_notebook_intellisense branch November 2, 2021 22:54
rchiodo added a commit that referenced this pull request Jan 13, 2022
rchiodo added a commit that referenced this pull request Jan 13, 2022
* Update package.json

For #8140

* Fixup mock problem and ensure intellisense uses pylance in devmode

* Fix host types

* Fix metadata not being visible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a setting to use new pylance mode for notebooks
4 participants