microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.29k stars 290 forks source link

notebook output cells no longer properly word wrap with "notebook.output.wordWrap": true #15759

Open alexdauenhauer-reddit opened 4 months ago

alexdauenhauer-reddit commented 4 months ago
image

I was on an M1 macbook pro, latest version of vscode, latest/pre-release version of Jupyter extension and simply typing ds like in the first cell of the screenshot would print with the output wrapped the same way that print(ds) looks in the second cell. I got a new M3 macbook pro, imported the same settings with settings sync and I have "notebook.output.wordWrap": true in my settings and it no longer wraps unless I wrap the output in a print statement

Environment data

Expected behaviour

executing ds would print wrapped output the same way print(ds) does, this behavior used to be the case

Actual behaviour

outputs are not wrapped unless explicitly wrapped in print

Steps to reproduce:


# %%
import pandas as pd
from datasets import Dataset
import string

data = {}

for letter in string.ascii_letters:
    data[f'column_{letter}'] = list(range(10))

df = pd.DataFrame(data)
ds = Dataset.from_pandas(df)
ds

# %%
print(ds)
  1. XXX

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

``` XXX ```

GF-Huang commented 1 month ago

Same issue.

Jupyter: v2024.7.0 Python: v2024.12.3 VSCode:

版本: 1.92.2 (user setup)
提交: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
日期: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

image image

Skoyer commented 1 month ago

Same Issue here. I tried a variety of things with the configurations. It seems this setting should work.

image

Here is a screenshot of the code: image

mysakbm commented 3 weeks ago

Same issue here. On mac m1, using VSC latest version to date. Using jupyter extension to date. Set all parameters with "wrap" in their name. And still cannot wrap simple long string variable... Apparently, this is pretty old issue. Is anybody working on it?