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
Inline Document Settings #39
Comments
I've added this entry which should do what you want: Note that it'd also do it for You can copy that entry into |
Suggestions for
|
On
Please also consider |
Draft changes for each:
Notes:
|
Note: For both check-spelling and spell-check-this, I'll rewrite any commits along So, I might, e.g. capitalize |
Side note... all Inline Document Settings work in Visual Studio Code with extension Code Spell Checker. |
Hmm, they're case-insensitive -- I was worried about that. Doing that right w/ what I have is a bit complicated (or at the very least a bit ugly, as There is a way to define case insensitive things in perl, but about half the time it has resulted in the regex engine getting really mad at me when it runs into fancy unicode content. v0.0.21 has a mode where it would more or less reject files that have unicode content, but some folks like using unicode, so they wouldn't use that flag. For some of the other things, it's a lot harder... At the moment, check-spelling is entirely line oriented. It retains roughly 0 state between lines, and its pattern format is similarly designed with that assumption. Just thinking about a way to enabling users to define their own state machines gives me a headache. OTOH, defining a simple state machine for pausing scanning and resuming is something I imagine I'll implement relatively soon (w/in a few releases). That'd be enough to support Consider:
For reference, check-spelling currently does ~1-5 passes per line (patterns, forbidden patterns, check-spelling,, candidates, check-candidates-for-progress). Adding an extra pass (probably before patterns) wouldn't be the end of the world, but... I've been thinking about plugging check-spelling into vscode for a while, and yeah, I'm aware that it has a cspell compatible thing atm. |
From reading the opened issues, I'm aware of the difficulty to ignore multi-lines. Maybe this is a push to pick Feature: Block-Ignore for a next release. 😁
My last comment was solely because of that future feature, since it could be a source of knowledge for you. 😉 |
Do I understand correctly that with What's not clear to me is, can such exclusions affect the next line? I.e. "don't spell check the immediately next line". This would be necessary, because e.g. in Markdown, it's awkward to put a comment at the end of a line, as is in code files where the line is long already. Related: #9 |
Yes. Note that it's just a pattern that you add to your local |
I see, thank you. What about excluding the next line due to the reasons I mention? |
That would require me to make the system stateful (#9). It's a lot more complicated -- amongst the many problems is how do I define a syntax which is backwards compatible -- the current I appreciate it's desired. And I think I'll try to implement it for the coming release. |
Thanks for your quick replies! |
Does check-spelling/check-spelling supports Inline Document Settings ?
I'm trying with
but it still reports has an unrecognized word.
The text was updated successfully, but these errors were encountered: