Writing a package for spell checking with LanguageTool


#1

Hi there. I am a beginner in CoffeeScript (and JS) and hacking Atom and new to anything involving a UI. I would like to learn about it by writing a spell checking package based on LanguageTool. The idea is to check the content of the current editor/buffer using the LanguageTool API when a checking-command is executed and then display the errors by marking the relevant positions in the text and giving the possibility to use the suggested solutions.

Now, I tried to understand the default spell-check plugin, but this seems a bit too much for a start. There are multiple checkers involved (for different languages?) and the checking is done in the background by a different task, which involves messaging between the processes. One could assume, that, because this package would not have to check for errors in real time, there is a simpler approach.

  • What is the canonical way to implement such a spell-checker in Atom?
  • Are there any other packages that provide a service that simplifies this?

Setting up the request to the API was easy, but now I am not sure on how to continue. Just some ideas on how to get into this project would be really helpful. :slight_smile:


#2

The Atom API documentation has information on what you would need for all of this:

Figuring out the UI for displaying options is going to be the tricky part. But you can take a look at the autocomplete-plus package for an example of how to do that.