Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

No spell checking at all #25

Open
mlangiu opened this issue Aug 24, 2017 · 10 comments
Open

No spell checking at all #25

mlangiu opened this issue Aug 24, 2017 · 10 comments

Comments

@mlangiu
Copy link

mlangiu commented Aug 24, 2017

Description

I am not able to get linter-spell-latex to do anything when trying it on this basic test file:

%!TeX spellcheck = en-US,en-DE
\documentclass{standalone}
\begin{document}
  It wourld be so naice if tihs woudl be correctted!
\end{document}

Steps to Reproduce

  • Install language-latex

  • Install linter-spell (and dependencies)

  • Install and set up hunspell

    ...$ which hunspell 
    /usr/local/bin/hunspell
    ...$ hunspell -D
    ...
    LOADED DICTIONARY:
    /Users/admin/Library/Spelling/en_US.aff
    /Users/admin/Library/Spelling/en_US.dic
    Hunspell 1.6.1
    
    • linter-spell setting "Spell Path": /usr/local/bin/hunspell
    • linter-spell setting "Default Languages": en_US.UTF-8 (tried just en_US as well...)
  • disable spell-check

  • multiple restarts

Versions and installed packages

Mac OS 10.12.5

Atom : 1.19.2
Electron: 1.6.9
Chrome : 56.0.2924.87
Node : 7.4.0

atom-latex@0.8.1
busy-signal@1.4.3
intentions@1.1.5
language-gams@0.4.0
language-gnuplot-atom@0.2.0
language-latex@1.1.1
linter@2.2.0
linter-spell@0.15.0
linter-spell-latex@0.10.0
linter-ui-default@1.6.7

@maa-x
Copy link

maa-x commented Sep 2, 2017

I have the same issue. I would like to additionally confirm that creating a .txt file with mistakes works, this is definitely something to do with this package and not linter-spell

@Aerijo
Copy link
Contributor

Aerijo commented Dec 17, 2017

@mlangiu @MaxIsMyName Does the package appear in the list returned by the following command?

atom.packages.activePackages

Open dev tools and type the above into the console. It should return a list of all active packages.

@mlangiu
Copy link
Author

mlangiu commented Dec 17, 2017

Hey Aerijo, thanks for getting back on this!
No, I only see

  • linter
  • linter-spell
  • linter-ui-default

not linter-spell-latex!

screen shot 2017-12-17 at 12 43 20

@Aerijo
Copy link
Contributor

Aerijo commented Dec 17, 2017

It looks like the activation hook isn't working for some reason. Did you do that after opening and viewing a .tex file (I see one in the next tab). The hook should activate when it detects that the language-latex package's grammar has been used.

@mlangiu
Copy link
Author

mlangiu commented Dec 17, 2017

I opened atom, then the tex file, then the dev console

@Aerijo
Copy link
Contributor

Aerijo commented Dec 17, 2017

If that still doesn't work, go to the settings for linter-spell-latex and click the View Code button. A window should popup; in the package.json file (in the package root directory), search for activationHooks. Delete this entry and it's contents. Finally, reload Atom and try the above again. It should definitely have activated this time.

@mlangiu
Copy link
Author

mlangiu commented Dec 17, 2017

Perfect that seems to do the trick!

Unfortunately the correction process isn't working properly:

  • To correct multiple misspelled words they have to be selected one by one (is there a keyboard shortcut for this?) via mouse
  • [Selecting the corrected spelling via mouse doesn't work at all] (cannot select corrected word using mouse linter-spell#46)
  • Selecting via ctrl+enter works but...
    ...after correcting a few words, `tihs':
    screen shot 2017-12-17 at 13 25 03
    turns into this after selecting the correction
    screen shot 2017-12-17 at 13 27 55

But since that seems like a more general issue (happens for normal text files as well) I'll report it on linter-spell as well. Thanks for the help

@Aerijo
Copy link
Contributor

Aerijo commented Dec 17, 2017

Yeah, I don't know much about the internals of how that works. I'm also still not sure why your activation hooks weren't working, but I'm glad you could work around it.

This issue should probably be left open, at least until a maintainer can read the conversation and determine if it's worth following up on. Like I said; I don't know if the issue is with this package or Atom's handling of activationHooks in general.

@schneiderfelipe
Copy link

If that still doesn't work, go to the settings for linter-spell-latex and click the View Code button. A window should popup; in the package.json file (in the package root directory), search for activationHooks. Delete this entry and it's contents. Finally, reload Atom and try the above again. It should definitely have activated this time.

I managed to see linter-spell-latex activated after doing this. I'm using Atom 1.28.2 under Ubuntu 18.04.4 LTS. I did all the steps mentioned by @mlangiu in this issue.

On the other hand, I see things such as documentclass being "corrected".

@anupanandsingh
Copy link

anupanandsingh commented Sep 21, 2020

Yeah, I don't know much about the internals of how that works. I'm also still not sure why your activation hooks weren't working, but I'm glad you could work around it.

This issue should probably be left open, at least until a maintainer can read the conversation and determine if it's worth following up on. Like I said; I don't know if the issue is with this package or Atom's handling of activationHooks in general.

@Aerijo, do we know a way to make it work now? I have tried the hacks listed on this page as well as here. Nothing seems to work. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants