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

Add words to workspace / folder settings does not work in Jupyter Notebooks #1353

Closed
Jason3S opened this issue Sep 27, 2021 · 1 comment · Fixed by #1369
Closed

Add words to workspace / folder settings does not work in Jupyter Notebooks #1353

Jason3S opened this issue Sep 27, 2021 · 1 comment · Fixed by #1369
Milestone

Comments

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 27, 2021

Issues Adding Words from Jupyter Notebooks

Original comment

_Originally posted by @ryan-feeley in #1341 (comment)

Unfortunately I'm still seeing this issue with v2.0.7 of the extension.

I think I have a fairly vanilla setup on Windows 10. No insiders builds. I have a simple single-root workspace. I tried to add a word to the workspace manually using the settings editor, and that worked, but if I use either RMB - > Add Words to Folder Settings QuickFix, or the lightbulb to access QuickFix, I get the Unable to add "{word}" error.

Here is the content of my *.code-workspace file. It is just in the folder root (not a .vscode subfolder), which is where Code prompted me to save it. Perhaps the relative path and lack of an explicit folder name is a problem.

{
	"folders": [
		{
			"path": "."
		}
	],
	"settings": {
		"cSpell.ignoreWords": [
			"pylance"
		]
	}
}

image

More Context

Originally posted by @ryan-feeley in #1341 (comment)

The issue appears to be related to the new "Jupyter Notebook" editor. The file in question was a *.ipynb (Jupyter Notebook) file. If I right-click this file in the File Explorer, do "Open With" and choose the "Text Editor" to open the file, then "Add Words to Folder Settings" and "Add Words to Workspace Settings" both work properly.

It appears likely related to something here, which the (kick ass BTW) cSpell extension may not quite be inter-operating with yet.

Native Notebook Support in VS Code
Notebook API

Two other observations:

  1. When I have a *.ipynb file open in the Jupyter Notebook editor, I don't get the "Add Words to Workspace Settings" option, even though I do have a workspace open in VS Code.
  2. (This may be by design). If I work within the text editor, once I've successfully done "Add Words to Folder Settings", which creates a .vscode/settings.json file, the existence of that file shadows the "cSpell.words" in my *.code-workspace file. Words are added to that field as requested, but cSpell ignores the whitelist in the *.code-workspace file. It appears to fallback to a the unions of the whitelists in ..\vscode\settings.json and .\cSpell.json, but skips the works in the *.code-workspace file.

Originally posted by @ryan-feeley in #1341 (comment)

@Jason3S Jason3S added this to the v2.0.X milestone Sep 27, 2021
Jason3S added a commit that referenced this issue Sep 29, 2021
fix: #1353

Add a workaround to address the issue that VS Code Config cannot cope with Notebook documents.
Jason3S added a commit that referenced this issue Sep 29, 2021
fix: #1353

Add a workaround to address the issue that VS Code Config cannot cope with Notebook documents.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant