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

Under the same color theme, the code highlighting of the ipynb file and the py file are inconsistent, and the code highlighting of the py file is more complete #6799

Closed
CatNofishing opened this issue Jul 25, 2021 · 6 comments · Fixed by #8001 or #8105
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language verified Verification succeeded
Milestone

Comments

@CatNofishing
Copy link

Environment data

版本: 1.59.0-insider (user setup)
提交: 04485223ebc6a075f39966bf9b3e261359ac7818
日期: 2021-07-23T19:21:12.120Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.18363

Expected behaviour

The code highlighting of the ipynb file and the py file are consistent

Actual behaviour

image

@CatNofishing CatNofishing added the bug Issue identified by VS Code Team member as probable bug label Jul 25, 2021
@joyceerhl
Copy link
Contributor

Are you getting any intellisense in your Jupyter notebook at all?

Note for triage, this is likely an issue with the notebook concat document code in the Python extension.

@CatNofishing
Copy link
Author

@joyceerhl Do you mean I need to submit this issue to vscode-python?😁

@greazer greazer added the notebook-intellisense Intellisense & other language features in notebook cells for any language label Aug 7, 2021
@mtsitzer
Copy link

I am also experiencing both issues mentioned in this item.

As for the inconsistent code highlighting colors, the ipynb/notebook colors seem muted (very hard to tell from the CodeSnap screenshots --- but definitely noticeable to my eyes when working with these files) compared to the py file colors, not to mention the different highlighting behavior:

.py
code_py
.ipynb
code_ipynb

As for the missing intellisense in the Notebook, I've noticed that this problem largely goes away when opening the Notebook in a workspace --- i.e. an instance of VSCode that has been opened from "Open Folder."

@greazer greazer removed this from the old August 2021 milestone Aug 14, 2021
@keg247
Copy link

keg247 commented Aug 23, 2021

I'm having the same highlighting issue. I'm using Pylance and the Dark+ theme. Unlike the py file, there is no semantic token information in the notebook - the only thing that shows is the textmates scope. If I turn off semantic highlighting and use a theme with textmates scopes, the highlighting appears to be consistent between a py file and notebook (although I did not scrutinize all of the possibilities for consistency).

py
ipynb

Intellisense works fine.

Environment data:
Version: 1.59.1 (system setup)
Commit: 3866c3553be8b268c8a7f8c0482c0c0177aa8bfa
Date: 2021-08-19T11:56:07.791Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT ia32 10.0.19043

If helpful, I can capture and upload the Jupyter output, Pylance output, and developer console.

@rchiodo
Copy link
Contributor

rchiodo commented Oct 25, 2021

This isn't actually fixed yet. Requires VS code core changes. See this pr:
microsoft/vscode#135602

@rchiodo
Copy link
Contributor

rchiodo commented Oct 25, 2021

Well and that PR will only fix it for opening files. Edits to files requires more fixes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language verified Verification succeeded
Projects
None yet
7 participants