Open Saltsmart opened 1 year ago
It's Python: Restart Language Server
. Do you not see that in the command palette?
I have similar problems with Pylance working for a while in a Jupyter notebook, then breaking.
It's Python: Restart Language Server. Do you not see that in the command palette?
For me, when the active VSC window is a Jupyter notebook, the command palette has Restart Language Server just for .Net, nothing for Python. Conversely, when the active VSC window is a Python file, the "Python: Restart Language Server" command does appear.
It's
Python: Restart Language Server
. Do you not see that in the command palette?
When the editor opens a .py
file, this appears:
However when in a jupyter notebook, this command vanishs:
Here is my environment and extension info:
Version: 1.81.1 (system setup)
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:22:42.175Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22000
Name: Python
Id: ms-python.python
Description: IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), code formatting, refactoring, unit tests, and more.
Version: 2023.14.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python
Name: Pylance
Id: ms-python.vscode-pylance
Description: A performant, feature-rich language server for Python in VS Code
Version: 2023.8.40
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance
Name: Jupyter Notebook Renderers
Id: ms-toolsai.jupyter-renderers
Description: Renderers for Jupyter Notebooks (with plotly, vega, gif, png, svg, jpeg and other such outputs)
Version: 1.0.17
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-renderers
Name: Jupyter
Id: ms-toolsai.jupyter
Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more.
Version: 2023.7.1002162226
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
Name: Flake8
Id: ms-python.flake8
Description: Linting support for python files using `flake8`.
Version: 2023.6.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.flake8
Name: Black Formatter
Id: ms-python.black-formatter
Description: Formatting support for python files using `black`.
Version: 2023.4.1
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
@DonJayamanne, this reminds me that the language status {}
button also doesn't show for notebooks. Maybe this should be solved in a general way for all languages rather than in a Python-specific way? Has this come up before?
I think @mjbvz would be the best person to answer this .
Can confirm I have the same issue(works in python file, doesn't show up in jupyter file) for the following environment
Version: 1.82.2 (Universal)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:59:47.790Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 22.6.0
Name: Black Formatter
Id: ms-python.black-formatter
Description: Formatting support for Python files using `black`.
Version: 2023.4.1
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
Name: isort
Id: ms-python.isort
Description: Import Organization support for Python files using `isort`.
Version: 2023.10.1
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.isort
Name: Jupyter
Id: ms-toolsai.jupyter
Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more.
Version: 2023.8.1002501831
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
Name: Pylance
Id: ms-python.vscode-pylance
Description: A performant, feature-rich language server for Python in VS Code
Version: 2023.10.20
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance
Name: Python
Id: ms-python.python
Description: IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), code formatting, refactoring, unit tests, and more.
Version: 2023.18.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python
Hi! Has there been any progress on this? We just ran into the same problem and it's quite annoying.
The "Python: Restart Language Server" command is listed in Python files but not in Jupyter notebooks. The "Python: Show Language Server Output" command, however, does show up in any file. So I'm wondering, would this just be a one-line change to remove the editorLangId == python
in the when-condition of the restart command in package.json
? To make it match the when-condition of the show-output command.
This has been discussed for vscode-python extension. A command called
restartLanguageServer
has been created.However this command can't be found in my command palette, maybe in pylance extension it's already deleted. I'd like a way to re-analyse the code in a jupyter notebook, since the language server (or the extension) is always broken weirdly microsoft/pylance-release#4736.