<ul dir="auto">
<li>VSCode Version: 1.0.0</li>
<li>OS Version: arch linux 64bit kernel 4.5</li>
</ul>
<p dir="auto">This is a feature request.</p>
<p dir="auto">Currently the only spellchecker available is <a href="https://github.com/Microsoft/vscode-spell-check">https://github.com/Microsoft/vscode-spell-check</a>, which is slow if you have a crappy connection, and is insecure.</p>
<p dir="auto">chrome has already a built in spell-checker, is there any way to use that rather than that extension? or aspell?</p>
<p dir="auto">Hello (first time contributing here)</p>
<p dir="auto">There are few offline spell checkers among VSCode extensions, but they are based on seriously faulty JavaScript implementations of <a href="http://hunspell.github.io/" rel="nofollow">Hunspell</a> spell checker.</p>
<p dir="auto"><a href="http://hunspell.github.io/" rel="nofollow">Hunspell</a> is nowadays probably the most widespread standard for spell check layer. It is used on MacOS, Linux and in some software (e.g. LibreOffice) on Windows. It is also used by both Atom and Sublime Text. There is an enormous collection of polished dictionaries for Hunspell.</p>
<p dir="auto">There exists some JavaScript implementations that refer to Hunspell's name but in fact they do not implement critical functionality - lexical parser. I have verified these three:</p>
<p dir="auto"><a href="https://github.com/GitbookIO/hunspell-spellchecker">hunspell-spellchecker</a><br>
<a href="https://github.com/cfinke/Typo.js">Typo.js</a><br>
<a href="https://github.com/wooorm/nspell">nspell</a></p>
<p dir="auto">All three work more or less following a simple idea of loading the dictionary into memory (into a associative table, a.k.a. dictionary, object to be precise). They use the Hunspell's affixes (.aff file) to create ALL variants of the words found in the dictionary (.dic file) and then store them in the memory. When checking spelling dictionary is simply asked whether the word exist or not. Simple, but it has these implications:</p>
<ol dir="auto">
<li>Loading takes a lot of time;</li>
<li>It takes a lot of memory too;</li>
<li>Memory consumption causes them to crash under dictionaries with more expanded affix system (two out of three mentioned, third does not consume all of the affixes).</li>
</ol>
<p dir="auto">For example when running <a href="https://github.com/GitbookIO/hunspell-spellchecker">hunspell-spellchecker</a> (there is a <a href="https://marketplace.visualstudio.com/items?itemName=swyphcosmo.spellchecker" rel="nofollow">SpellChecker</a> extension based on it) with English dictionary ("en_US", 62K+ words in dictionary) memory consumption is in peaks 500 MB and constantly above 250 MB. It crashes under Polish language dictionary ("pl_PL", 300K+ words in dictionary) after reaching about 1.5 GB memory consumed (there are reports about other dictionaries doing the same) with "JavaScript heap out of memory" message hidden well under the hood. Hunspell has a lexical parser which allows it to use these two sets (dictionary and affixes) "on the fly" without the need to merge them thus exploding memory consumption and load time.</p>
<p dir="auto">There is a good spell checker component for node.js, which is actually a bindings for native spell checkers for MacOS (NSSpellChecker), Linux (Hunspell) and Windows (Spell Check API in windows 8+, Hunspell in earlier versions):</p>
<p dir="auto"><a href="https://github.com/atom/node-spellchecker">https://github.com/atom/node-spellchecker</a></p>
<p dir="auto">It is alas a native module.</p>
<p dir="auto">I have built a spell checker using this module. I will rather not publish it because it is quite pointless:</p>
<ul dir="auto">
<li>The extension will (silently) stop working every time the electron or node get a version bump and I cannot guarantee I will always be around to rebuild binary dependencies quickly;</li>
<li>Rebuilding binary dependencies is quite a hassle;</li>
<li>I am unable to reasonably maintain binary dependencies for all three platforms (MacOS, Linux &amp; Windows) - there already is an <a href="https://marketplace.visualstudio.com/items?itemName=adrienjoly.vscode-spellchecker-fr" rel="nofollow">extension</a> which uses this module, but it provides binary dependencies for MacOS only;</li>
<li>Even If I would produce node-spellchecker module using <a href="https://github.com/mapbox/node-pre-gyp">node-pre-gyp</a> with binaries for various platforms if I understand things correctly extension cannot (easily?) install dependent modules using npm (which could also imply having a proper C++ toolchain around in case node-pre-gyp packaged binaries are not sufficient). Binaries are packaged and simply get downloaded along with the extension.</li>
</ul>
<p dir="auto">So I would like you to consider doing something about it.</p>
<p dir="auto">There are few paths I can imagine among them two are most obvious:</p>
<ol dir="auto">
<li>Build the node-spellchecker module along with the VSCode and make it available among "standard" modules that extension developers can count upon (this could result in more than one spell checker extension e.g. for spelling text or latex documents, comments in code etc.);</li>
<li>Provide a way to use native modules among extensions' dependencies.</li>
</ol>
<p dir="auto">I am most probably no one to discuss pros or cons of these alternatives, there are maybe other alternatives that I cannot see, but I think that with the evidence provided it is clear that unless something changes the answer to the question in the title is MOST PROBABLY NOT!</p>