-
Notifications
You must be signed in to change notification settings - Fork 37
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
Spell check omitted for the opened projects, FORCE recheck feature request #190
Comments
Is there a chance you could try to identify WHEN is the document not spelled? BTW. When you modify a line and save the document with default setting of |
In my case the spell ckeck does not work (verified on 2 projects) when I open a new empty window of VSCode and then open "Recent" folder (project). For example, you can try to clone and open Clubmark directory (project). I don't want to turn on the |
I have tested this both on Windows and Linux (Kubuntu 18.04). Everywhere it is spelled after re-openning. |
The language is set as English - United States, the config file is: "spellright.language": "en_US",
"spellright.documentTypes": [
"cpp",
"html",
"latex",
"markdown",
"plaintext",
"python"
],
"spellright.parserByClass": {
"cpp": "code",
"html": "xml",
"latex": "latex",
"markdown": "markdown",
"python": "plain"
}, User: "spellright.notificationClass": "information",
"spellright.recheckOnSave": false,
"spellright.language": "en_US",
"spellright.documentTypes": [
"cpp",
"html",
"latex",
"markdown",
"plaintext",
"python",
// "xml"
],
"spellright.ignoreFiles": [
"**/.gitignore",
"**/.spellignore",
"*.dict"
],
"spellright.ignoreRegExps": [
"/\\b[_A-Za-z]+[_A-Z0-9]+\\w*|[=?&@%~*^+-\\]+\\w+|\\b\\w+[=?&@%~*^+-]+/g", // Identifiers, Expressions
// Function call, cmd literal, file extension (Note: \b instead of \s breaks URLs parsing)
"/\\b\\w+\\([^)]*\\)|\\b`\\$[^`\\n]*`\\b|\\s+\\.\\w{1,4}\\s+/g", // m - multiline
],
"spellright.ignoreRegExpsByClass": {
"python": [
"/\\b_\\b|\\batexit\\b|\\bbool\\b|\\b@?classmethod\\b|\\bctime\\b|\\bctypes\\b|\\bdel\\b|\\bdeque\\b|\\bdict\\b|\\bdistutils\\b|\\bdoctest\\b|\\belif\\b|\\berrno\\b|\\bfunctools\\b|\\bhasattr\\b|\\bisinstance\\b|\\bkwargs\\b|\\blen\\b|\\bnamedtuple\\b|\\bpid\\b|\\bPopen\\b|\\bproc\\b|\\bstacktrace\\b|\\b@?staticmethod\\b|\\bstr\\b|\\b@?unittest\\b|\\burlencode\\b|\\burllib\\b|\\burlparse\\b|\\bviewkeys\\b|\\bviewvalues\\b|\\bxrange\\b/g",
]
}, |
|
The same issues happens after opening VSCode folder with only a single file opened, May be the issue indeed caused by some other extensions, but it should not be so otherwise another extensions also would be dysfunctional. |
Here is a full log with lots of errors in the Spellright:
|
Maybe you could make a quick side installation of portable version? It is just unpacking a ZIP and creating a single folder ( It may be that some other extension does something about the event Spell Right uses and it crashes the chain. It's just that I really can not reproduce this! |
Thanks for the log! It's not from Spell Right but from extension host and it does not tell much about what is happening but it's better than nothing. If you could please consider doing a side test would be great. |
Could you please try to set: "spellright.useDocumentSymbolsInCode": false and tell me the results? |
No, please ignore this: |
Could you please download and install manually this version? |
The same issue in the portable version with only the Spellright installed with the following config: {
"telemetry.enableTelemetry": false,
"spellright.notificationClass": "information",
"spellright.recheckOnSave": false,
"spellright.language": "en_US",
"spellright.documentTypes": [
"cpp",
"html",
"latex",
"markdown",
"plaintext",
"python",
// "xml"
],
"spellright.parserByClass": {
"cpp": "code", // spells comments and strings
"html": "xml", // spells comments and everything outside markup
// "html": "plain", // spells comments and everything outside markup
"latex": "latex", // spells everything except LaTeX commands
// "markdown": "plain", // spells entire content of the document
"markdown": "markdown", // spells everything except code blocks
"python": "plain", // spells comments and strings
// "txt": "plain" // spells entire content of the document
},
"spellright.ignoreFiles": [
"**/.gitignore",
"**/.spellignore",
"*.dict"
],
"spellright.ignoreRegExps": [
"/\\b[_A-Za-z]+[_A-Z0-9]+\\w*|[=?&@%~*^+-\\]+\\w+|\\b\\w+[=?&@%~*^+-]+/g", // Identifiers, Expressions
// Function call, cmd literal, file extension (Note: \b instead of \s breaks URLs parsing)
"/\\b\\w+\\([^)]*\\)|\\b`\\$[^`\\n]*`\\b|\\s+\\.\\w{1,4}\\s+/g", // m - multiline
// Note: URIs should be removed by the Spellright itself
// "/\\bhttp(s)?://[^,; \"'})\\]\\n]*/g", // URIs. ATTENTION: '\n' is required, otherwise multiline regexp is yielded
],
"spellright.ignoreRegExpsByClass": {
"cpp": [ "/#include\\\\s+\\\".+\\\"/g" ],
"html": [
"/<script>[^]*?</script>/gm",
// "/^\\s*%\\s+.*:\\s*$/", // Bottle template commands
"/^\\s*%\\s+.*:\\s*$/gm", // Bottle template commands
"/{{[^}]*}}/g", // Bottle template vars
// HTML keywords, etc.
"/\\btd\\b|[0-9 ]px\\b/g"
],
"latex": [ "/\\\\\\begin{minted}[^]*?\\\\\\end{minted}/gm" ],
"python": [
// "/`\\w+`|'\\w+'|\"\\w+\"/g", // Explicit inline markdown commands or literals
// //"/\\br\"\"\".+\"\"\"/gm", // Multiline raw string
// "/\\br'.+'|\\br\".*\"/g", // Raw strings
// Python keywords, functions, etc.
"/\\b_\\b|\\batexit\\b|\\bbool\\b|\\b@?classmethod\\b|\\bctime\\b|\\bctypes\\b|\\bdel\\b|\\bdeque\\b|\\bdict\\b|\\bdistutils\\b|\\bdoctest\\b|\\belif\\b|\\berrno\\b|\\bfunctools\\b|\\bhasattr\\b|\\bisinstance\\b|\\bkwargs\\b|\\blen\\b|\\bnamedtuple\\b|\\bpid\\b|\\bPopen\\b|\\bproc\\b|\\bstacktrace\\b|\\b@?staticmethod\\b|\\bstr\\b|\\b@?unittest\\b|\\burlencode\\b|\\burllib\\b|\\burlparse\\b|\\bviewkeys\\b|\\bviewvalues\\b|\\bxrange\\b/g",
]
},
} Errors:
|
Thank you for the test! |
The same issues for the manually installed 2.5.25 on the portable VSCode without any other extensions. The log:
|
Thank you for all the test. There certainly is something bu I do not understand it yet. I think it has gone unnoticed, but could you please maybe do the test with "spellright.useDocumentSymbolsInCode" set to false? |
I think I was finally able to reproduce the exact problem that you reported and I hope this version has it sorted out. If you could please could give it a try would be enormous help. Sorry for this many interactions earlier but it seems to b rather hidden issue in some circumstances. |
To be sure that VSCode works I installed another extension (pylint), it worked unlike the manually installed Spellright. |
That's even more confusing. I have installed 2.5.26 and it seems to work. The reason for what you observe is that Spell Right uses document symbol generated by language parsers to suppress them from spelling result - by the logic that symbols are probably spelled correctly so if they exist in the comments they should be OK anyway. Some parsers return null at first call and Spell Right failed silently in such situations. This was probably what you observed when documents did not get spelled. It seems to be corrected in 2.5.26. I will investigate further tomorrow. |
Could you please tell me whether the very last version published (2.5.28) exercise this behavior? I have done some tests and it should absolutely not (before patch it did crash silently after it should not). |
Regarding the portable version it looks like you have simply not installed the dictionaries! They have to be installed locally to the portable installation (probably linking folder from regular installation is enough). Portable installation is by design deprived information on any other existing installations. Initial en-us is taken from OSes preferred language. It would work if the dictionaries would be named in this convention (en-us.dic/en-us.aff) but often they are named arbitrarily so Spell Right really cannot guess the name of the file... Do I understand correctly that the first paragraph is about testing in regular release od VSCode (not portable) where you CAN enable Spell Right and select dictionary? Once you select dictionary does Spell Right not work at all? |
Thank you for the clarification. |
I am sorry I will be following the thread (despite it seems to be working well for others) and this means I will ask questions.
|
Again, I am sorry, please ignore the above because it seems that I was glued to one suspected point (suggested by the logs you pasted & corrected in recent versions) but the problem you have may be in some completely different area: Could you try t check if your documents get spelled when you disable (comment out) |
Spellright starts the spell checking of the modified lines only after commenting "spellright.ignoreRegExps": [
"/\\b[_A-Za-z]+[_A-Z0-9]+\\w*|[=?&@%~*^+-\\]+\\w+|\\b\\w+[=?&@%~*^+-]+/g", // Identifiers, Expressions
// Function call, cmd literal, file extension (Note: \b instead of \s breaks URLs parsing)
"/\\b\\w+\\([^)]*\\)|\\b`\\$[^`\\n]*`\\b|\\s+\\.\\w{1,4}\\s+/g", // m - multiline
],
The modified test line is:
|
Oh, gosh! You have created regular expression that erases everything from spelling. That's the reason why you do not get any results! See: |
Thanks! It means I modified the regex at some point. Anyway, now the problem is that only the modified lines are spelled and I don't want to recheck the whole document on save (too resource consuming). |
Leaving the recheck command aside for a second: Could you show me a situation when something is not spellchecked? Spell Right 1) Spells whole document on open/configuration change and few other events, then 2) monitors changes so that everything you (or other subjects, e.g. extensions) change is spelled. Should consistently spell check the document you are working on. Could you show me when is this inconsistent? Because I understand that it fails in some places so you have parts of document not spelled and you want the whole document rechecked - right? |
The Spellright works fine now but only for the modified lines of code. It would be convenient to have an opportunity to manually request recheck of the whole document, which in practice performed rarely, mainly before the code release. |
Do unmodified lines of code not have spelling errors marked earlier? |
Spellright checked everything several months ago bu at that time I used default Anyway, currently mostly it is a huge advantage to check only the modified lines on |
The |
Great to hear this but I swear I have not changed anything about the issue from 2.5.26. I will consider |
In some cases the spell check is omitted when a Python "project" or "files folder" is opened. Note that the same time the spell check works fine when a single file outside the project folder is opened.
This issues relates to the caching of the performed spelling: when I select a line with improper spelling and modify it (add a space) then the line is rechecked and the issues are shown. But it's infeasible to manually modify thousands lines in a file...
It would be convenient to have a new command:
> SpellRight: Force recheck
or something like this to recheck specific files in the project (forcing recheck of the whole file including the cached fragments).The text was updated successfully, but these errors were encountered: