Closed
Description
openedon Jun 13, 2022
Issue Type: Bug
When using the new notebook document features in LSP 3.17, the Interactive Window's input box is not considered to be a notebook cell. I think this is primarily because its URI scheme is vscode-interactive-input
instead of vscode-notebook-cell
. See the check here.
The current behavior creates a couple of problems for Pylance:
- Since Pylance doesn't know that the input box is related to the Interactive Window's actual notebook cells, its name scope is not chained together with theirs. This means that when typing in the input box, Pylance acts as if the user doesn't have access to symbols defined in those previously executed cells. IntelliSense doesn't provide those symbols as completions, semantic highlighting doesn't color those symbols properly, etc.
- Since Pylance doesn't know that the input box is at all related to notebooks, certain notebook-specific behaviors are not enabled (ex. allowing magic commands rather than flagging them as Python syntax errors).
@rchiodo, @dbaeumer, and I have been discussing this in a Pylance issue. This comment would be a good spot to start reading.
VS Code version: Code - Insiders 1.68.0-insider (4af164e, 2022-06-08T11:37:22.322Z)
OS version: Windows_NT x64 10.0.22538
Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 31.92GB (7.87GB free) |
Process Argv | --crash-reporter-id c031ffde-fde4-40dc-8a32-5922dc21e570 |
Screen Reader | no |
VM | 0% |
Extensions (10)
Extension | Author (truncated) | Version |
---|---|---|
vscode-eslint | dba | 2.2.2 |
EditorConfig | Edi | 0.16.4 |
prettier-vscode | esb | 9.5.0 |
csharp | ms- | 1.25.0 |
python | ms- | 2022.9.11611009 |
vscode-pylance | ms- | 9999.0.0-dev |
jupyter | ms- | 2022.6.1001631011 |
jupyter-keymap | ms- | 1.0.0 |
jupyter-renderers | ms- | 1.0.8 |
vscode-typescript-tslint-plugin | ms- | 1.3.4 |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
wslgetstarted:30449409
vscscmwlcmt:30465136
cppdebug:30492333
pylanb8912:30496796
vsclangdf:30492506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment