Closed dpavlic closed 8 years ago
Which version of Atom are you running?
same here on windows 10, atom 1.7.2, it used to work without specify LANG in env settings (I'm using chinese version of windows, English language is installed)
Same problem here since 1.7.2 (or maybe earlier?) and I can reproduce the fix from @dpavlic.
Xubuntu 16.04 (German)
@OJFord could this be related to your change https://github.com/atom/spell-check/pull/114?
Also on the 1.7.2.
@lee-dohm I haven't experienced this, but I don't think I've used latest build yet. Odd - possibly something else has changed that's set hard to en_US
?
If someone wants to try reverting atom/node-spellchecker#33 on their system - it's an easy one-line change - we'll know more, I would but I don't have access to it at the moment.
Actually - @dpavlic - what happens if you keep en_CA
but launch atom from the terminal with that environment?
I tried reverting atom/node-spellchecker#33 as per OJFord's suggestion above and the spell check is working again. Atom 1.7.2; Spell-check 0.67.0, Arch Linux; $LANG=en_GB.UTF-8
My LANG
was set to en_NZ.utf8
I set LANG
to be both en_US
and en_US.utf8
and both of those worked.
I'm pretty sure I have the NZ dictionaries installed. Even so, if lang_region isn't found, spell check libraries like Hunspell should fall back to the fist available lang.
This was working on an earlier version (see marked duplicate)
@sumdog Can you please try setting (or keeping) NZ and launching atom
from a terminal with that environment?
@OJFord launched from an interactive terminal, but got the same result. en_NZ.utf8
returns no spell check, but with en_US.utf8
spell check works.
I'm on atom-1.7.3-r1 on Gentoo (official portage release)
I have the same problem.
Ubuntu GNOME 16.04
$ atom -v
Atom : 1.7.4
Electron: 0.36.8
Chrome : 47.0.2526.110
Node : 5.1.1
$ echo $LANG
en_GB.UTF-8
$ echo $LANGUAGE
en_GB:en
Using packages from ppa:webupd8team/atom.
I can use the US spelling with
$ LANG=en_US.UTF-8 atom
I suspect for any further progress on this we'll need tests for it.
I'll try to get to it within a week - I'm conscious that it's at least partially my fault as I didn't add any initially - but if anybody's sufficiently motivated to beat me to it, that'd be awesome. The couple of lines implementing (uh..) LANG
detection is the grand total of my coffee script experience.
Edit to be clear: the change was to atom/node-spellchecker#33 (and a corresponding dependency-version bump here) which someone else tested and they continue to pass. So if you clone node-spellchecker
and run it directly, you should find that works; just something's changed here. That said, almost nothing has...
Actually, I can't reproduce this. I'm also running latest stable release 1.7.4 and using LANG=en_GB.UTF-8
just fine: 'colour' no squiggle; 'color' squiggle.
If I instead run env LANG=en_CA.UTF-8 atom
, then I get a 'color' no squiggle; 'colour' squiggle.
I'm on OS X, it seems everybody reporting problems running some flavour of Linux. I'm not really sure what would cause that at all. Perhaps if anyone with the problem has a moment they could try running node-spellchecker directly? Though it does pass on Travis.
Same problem here with Uubuntu 16.04.
So now atom looks for a dictionary corresponding to the language set in $LANG. If these files are not found under (referring to the official .deb): /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/vendor/hunspell_dictionaries
the spell check is disabled. So for now you can either set $LANG to en_US as this is the only dict which shipped with atom, or copy manually the .dic and .aff files from hunspell to the above mentioned directory. For a german spell check you should have installed hunspell-de-de. You find the files you need under /usr/share/hunspell/ (on a debian unstable system). Simply copy the .aff and .dic files you want over to the atom directory and the spell check is working.
It would be nice in order to sort this out finally to make atom look for dictionary files in several system-wide directories (e.g. /usr/share/hunspeil ).
I can't get spelling to work either.
Ubuntu: 15.10 Atom: 1.7.4 Electron: 0.36.8 Chrome : 47.0.2526.110 Node : 5.1.1
I was able to get it to work after setting the default to en_US. IT's clearly broken for others. EN_ca was my default.
Thanks to @winnieXY suggestion, I made spell checking in atom 1.7.4 from AUR packaging (local building from sources) works!
In the Arch Linux package the path /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/vendor/hunspell_dictionaries
is missing.
To fix it and to use all the installed dictionaries is enough to use once the following command:
sudo ln -s /usr/share/hunspell /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/vendor/hunspell_dictionaries
It is weird that the only way to select the language to use for spelling is to tweak the LANG environment variable. What about a setting (global and per-file) into Atom...?!
I'm going to close the other report I opened about this problem.
@diraimondo I agree it's a pain to only be able to change language with $LANG
, but there were long threads (atom/spell-check#21, for one) of people requesting the issue, and Atom team members (whose time and effort we all appreciate, of course) saying basically "Yes! ..some day".
I modified atom/node-spellchecker#33 to detect from the environment, and thankfully that trickled up through atom/spell-check#114 to work in Atom.
At the time of writing I'm not familiar enough with Atom packages, CoffeeScript, or just generally "how to hack the hackable editor" - or have the time to learn - to implement a config or menu-based option. But it is on my to-do list.
As for this issue, it now seems the actual problem is with atom/node-spellchecker.
@OJFord I'm not familiar at all with CoffeeScript and Atom coding too. At the moment, the most viable way to fix many problems of the spell-checker is to promote the PR https://github.com/atom/spell-check/pull/120. I'm testing it on my installation and it looks to work. Maybe not perfect but at least I can change the language used from the settings. It should support multiple languages (combined on checking) but this didn't work for me.
It looks that the Atom developers has very few spare time for taking care of the spell-checker.
@diraimondo Very nice! Hadn't seen that.
I also have the same issue, System is Ubuntu 16.04 and Atom 1,8.0. Only if i export LANG=en_US.UTF-8 the spell checker works. (even if also the German dictionary is installed. But still right now I want to edit an English text ;). ) I just installed atom the first time because of its markdown-editing-preview which is quite nice. But to be really usable, basic features like spell checker should work. Is it now, that it is only possible to switch the language by ENVs ? For sure would be much better to have it selectable even per file in the gui (like the the linefeed text encoding and model in the lower right corner).
Ubuntu 16.04 - Danish language. Same issue.
Same here on Ubuntu 16.04 x64 with Atom 1.8.0, spell-check 0.67.1 and LANG
set to en_AU.UTF-8
.
EDIT: works fine with latest Atom
@50Wliu @lee-dohm Can I suggest locking this, or at least removing the [needs-reproduction] tag?
It's clearly an issue on Linux, but:
Can confirm spell-check is working again on 1.11.0-beta5.
In Fedora 24 (atom 1.11.1), I manage to get it working by:
Hi, I tried the procedure of ld2ndR on Fedora25, atom 1.12.6:
The problem is really annoying. Is there a known general solution (I would not mind copying the .dict files, although the solution would not be very elegant) My standard locale is en_GB
@robert-winkler Did you try @diraimondo's solution? It works for me on Ubuntu.
@robert-winkler - I'm not sure if I misunderstood you, but if the problem is a specific type of files not being checked at all, you probably need to add that type of file context into the spell-check settings on atom.
To find out what the context of your files is, you should use the command palette (ctrl-shift-p) and search for Editor: log cursor scopes
. Copy the string that will pop up as a notification, and you should be good to go.
[ Unless I misunderstood your problem, that is ]
I tried solutions made by both @Id2ndR's comment and @diraimondo's comment. But what worked for me was @eberghoefer's solution.
Spell-checking should not be this difficult.
Linux version 4.4.0-36-generic (buildd@lgw01-20) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #55~14.04.1-Ubuntu SMP Fri Aug 12 11:49:30 UTC 2016
Atom : 1.14.4
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
Not sure how live this issue is, but the language-chapel package somehow has spellcheck working out-of-box.
> atom --version
Atom : 1.15.0
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
> uname -a
Linux hostname 4.4.0-71-generic #92-Ubuntu SMP Fri Mar 24 12:59:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I faced the same issue using PureOS 8 (a debian flavoured GNU/Linux). I managed to resolve it with teh following steps,
sudo apt search hunspell-gb-en
in my case. See a list of available dictionaries here, else install the dictionary sudo apt install hunspell-gb-en
/usr/share/hunspell/
in the field Locales Pathyou should now have spell check working.
I found that on my system, I needed to add the symbolic links to /usr/lib/atom/node_modules/spellchecker/vendor/hunspell_dictionaries/
from /usr/share/hunspell/
.
Hitting the same issues STILL on 16.04, very annoying, this should not be so difficult. It works out of the box on OSX and Windows.
I have this problem on 16.04 I had to follow the documentation to get this working: https://github.com/atom/spell-check#debian-ubuntu-and-mint
Thx @quasipedia, adding the cursor scope (in my case text.tex.latex
) to the command palette of spell-check did the trick.
I am having trouble with getting spell check to work. Just running Atom and toggling spell check, I get no spelling warnings.
The LANG environment variable on my system is set to
en_CA.UTF-8
. Running Atom directly from the terminal viaLANG=en_US.UTF-8
works and gives me American spelling warnings. Any ideas as to what could be the issue?