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

Spellcheck excluded scopes don't work properly #238

Closed
Rahlir opened this Issue Mar 2, 2018 · 7 comments

Comments

Projects
None yet
6 participants
@Rahlir

Rahlir commented Mar 2, 2018

Edit by @rsese to add more specific repro steps

  1. Create a file called test.md with this content:
# Hello Worrld

Notice at this point that Worrld is shown as misspelled.

  1. In Settings > Packages > spell-check > Excluded Scopes, add markup.heading.heading-1.gfm

At this point, Worrld is no longer shown as misspelled.

  1. Restart Atom.

Expect Worrld to not be shown as misspelled, actual behavior is it is shown as misspelled.

If you go back to Settings > Packages > spell-check > Excluded Scopes, and remove markup.heading.heading-1.gfm and then paste it right back in, Worrld is not shown as misspelled anymore.

Tested with 1.27.0-dev-14e6500e0 on macOS 10.12.6.


Description

When I setup exceptions for Latex scopes in the new Atom Beta release and it works fine, until I close Atom and open it again. The spell check suddenly goes back to checking everything and in order for the exceptions to work, I have to delete and paste back the scopes I don't want checked.

Plus, and this might be a separate issue, adding "known words" in the spell-check also doesn't work, the known words are still labeled as incorrect.

My excluded scopes: support.function.general.tex, support.function.textbf.latex, storage.type.function.latex, support.function.textit.latex, meta.preamble.latex, meta.embedded.block.source

Steps to Reproduce

  1. Set up excluded scopes
  2. Quit Atom
  3. Re-open Atom and a relevant file

Expected behavior: Text within excluded scopes should be ignored

Actual behavior: Text is spell-checked even though it is within excluded scope

Reproduces how often: always so far

Versions

1.25.0-beta2

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@rsese

This comment has been minimized.

Member

rsese commented Mar 7, 2018

Thanks for the report - can you share a minimal specific example with an example file, a single excluded scope, and where the text is spell-checked after restarting Atom?

@gncs

This comment has been minimized.

gncs commented Mar 16, 2018

I am experiencing the exact same issue as @Rahlir. My excluded scopes are "keyword.control.preamble.latex" "keyword.control.cite.latex" "support.function.general.tex" "support.function.textbf.latex" "support.function.texttt.latex" "support.function.textit.latex" "constant.other.general.math.tex" "constant.character.math.tex".

@gncs

This comment has been minimized.

gncs commented Mar 16, 2018

Example:

\documentclass[a4paper,10pt]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}
\end{document}

Configuration:

    excludedScopes: [
      "keyword.control.preamble.latex"
    ]

Without the excluded scope, documentclass and usepackage are labeled as incorrect.
With the excluded scope they are ignored.

@rsese

This comment has been minimized.

Member

rsese commented Mar 22, 2018

Thanks a lot @gncs 👍, I see what folks are saying now - I can reproduce the situation you described @gncs and can also repro with this Markdown example in safe mode:

  1. Create a file called test.md with this content:
# Hello Worrld

Notice at this point that Worrld is shown as misspelled.

  1. In Settings > Packages > spell-check > Excluded Scopes, add markup.heading.heading-1.gfm

At this point, Worrld is no longer shown as misspelled.

  1. Restart Atom.

Expect Worrld to not be shown as misspelled, actual behavior is it is shown as misspelled.

If you go back to Settings > Packages > spell-check > Excluded Scopes, and remove markup.heading.heading-1.gfm and then paste it right back in, Worrld is not shown as misspelled anymore.

@lee-dohm

This comment has been minimized.

Member

lee-dohm commented Mar 27, 2018

@maxbrunsfeld Can you take a look at this?

@werunom

This comment has been minimized.

werunom commented Apr 24, 2018

Experiencing similar problem in latex with the following excluded scopes - .support.function.latex and .keyword.control.latex

@maxbrunsfeld

This comment has been minimized.

Contributor

maxbrunsfeld commented Apr 25, 2018

Hey everyone, sorry for putting out a totally buggy implementation of this long-requested feature. I believe the bugs have been addressed. The fix will go out this week in Atom 1.26.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment