Closed RichardLitt closed 6 years ago
Interesting! Not yet, I think.
You could create an integration with Atom though. Take a look at the code for atom-linter-alex
for examples! Alex is a bit weirder than using just remark/retext directly, so youโd need less weird things for this, I think?
Did you think of how the UI of this should look? How would one pick a language/dictionary?
Cool, I didn't know that alex had a plugin.
I was more interested in just seeing all spelling errors, really. The dictionary and language should be the system defaults, but it should ignore code blocks.
The UI could be almost identical to atom-linter-alex, actually. I was thinking more about just outputting all errors to STDOUT, and not bothering with atom at all.
With a .remarkrc.js
like this:
/* `.remarkrc.js` */
var unified = require('unified')
var remark2retext = require('remark-retext')
var english = require('retext-english')
var spell = require('retext-spell')
var dictionary = require('dictionary-en-us');
exports.plugins = [
[remark2retext, unified().use(english).use(spell, dictionary)]
]
...you should be able to run remark .
on the CLI or with linter-remark
in atom, and that should highlight spelling mistakes!
The dictionary and language should be the system defaults
Hmm, not sure about how that should work ๐ค
I also saw spellchecker-cli
, maybe thatโs interesting?
spellchecker-cli does what I need! Good catch!
I think I will use that for now. Shall I close this?
Great to hear Richard, and that's good! ๐
Hey @wooorm! ๐
Is it possible to use this on the CLI, or within an editor that shows all of the issues at once in a block? I'm tired of manually looking for red underlines in Atom, and want a cleaner solution.