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

Code cells are being spellchecked #141

Open
Nicholaswogan opened this issue Jan 22, 2024 · 7 comments
Open

Code cells are being spellchecked #141

Nicholaswogan opened this issue Jan 22, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Nicholaswogan
Copy link

In many cases, this extension is checking the spelling in "code" cells. Is this expected behavior? Can this behavior be turned off?

Screenshot 2024-01-22 at 1 52 49 PM

@Nicholaswogan Nicholaswogan added the bug Something isn't working label Jan 22, 2024
@krassowski
Copy link
Collaborator

Yes and no. By default only comments are checked in code, which is opt-out. String checking are opt-in. What do you see in your settings (go to menu bar Settings → Settings Editor → Spellchecker); this should look like:

image

@Nicholaswogan
Copy link
Author

This is what my settings looks like:

Screenshot 2024-01-23 at 8 13 40 AM

@bradezard131
Copy link

Also seeing this issue, getting misspelling notes on imports, class names, etc. and no obvious way to turn it off
image

@krassowski
Copy link
Collaborator

@bradezard131 is this in a notebook or in the file editor? What browser are you using? If you type something in the editor does it go away?

@bradezard131
Copy link

This is a notebook running in chrome. It does appear to go away when I start typing in each cell, which I'll use as a workaround for now to clean it up. I'd hope that this is still considered a bug though that I have to type in every cell to clean up the attention-grabbing red boxes.

@krassowski
Copy link
Collaborator

It does appear to go away when I start typing in each cell, which I'll use as a workaround for now to clean it up

Ok, I see what is happening. It has nothing to do with the feature of spelling in code. Instead, the notebook initially advertises the cell to contain text and only switches the MIME format to Python code after the kernel has connected. Thus, the extension thinks that it is checking plain text. I never seen this in the notebook before but I did see this issue in File editor.

The solution would be to ensure we refresh the spellchecking after the editor MIME type changed.

@shivendra90
Copy link

Happening here as well. A good workaround is to close the notebook from the tab (don't shut down the kernel) and open it again. Those annoying highlights will go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants