-
Notifications
You must be signed in to change notification settings - Fork 294
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
Time magic causes the cell to lose its syntax highlight and autocompletion #11476
Comments
@leocwolter Thanks for the report. Makes sense what is going on here. Cells are getting sent to the language server (probably Pylance in this case), language server doesn't have knowledge of jupyter magics, so the cell doesn't get language features. I think that we have some ways we can work around this (either converting the magic to the underlying code that executes, or skipping it). |
@IanMatthewHuff Yeah, it makes sense 🤔 how can I test those workarounds? Also, I just noticed that variables declared at the cell using the Variables declared on cells without the magic are recognized/autocompleted correctly: |
@leocwolter My apologies. I don't know that you could really test those workarounds yourself, that was more just me thinking about how we could fix this. The issue that you just listed would be expected as well, the cell (with the magic) gets sent to the language server, the language server sees the magic and doesn't recognize it as python, so nothing else after that in the cell gets processed. The code runs, so the program should still work, but the language features miss that whole cell in their knowledge of what's going on. |
This bug is annoying, and old. Any progress recently? |
@DonJayamanne I see you added the |
Duplicate of #4588 |
Environment data
Remote - SSH
andRemote - Containers
but not using the remote jupyter feature.Expected behaviour
The cell using the
%%time
magic should continue to have syntax highlight and the autocompletion feature should continue workingActual behaviour
The cell using the
%%time
magic loses its syntax highlight and autocompletion featureSteps to reproduce:
Logs
No useful logs since you don't have to execute anything to reproduce the issue
The text was updated successfully, but these errors were encountered: