fhchl / languagetool

Check spelling and grammar in Atom using LanguageTool
MIT License
4 stars 0 forks source link

Unify / Merge languagetool packages #1

Open wysiib opened 7 years ago

wysiib commented 7 years ago

Hi,

I am the author of the linter-languagetool package for Atom.

I just learned about your package and I tried it out. Admittedly, yours features a deeper and thus more useful integration (suggestions, etc.). There is just one feature I am missing: the ability to use a local language tool server.

Maybe we should join forces and move the code for the local server from my package to yours. In consequence, I could unpublish the other atom package in order to avoid confusion for users.

Regards,

Sebastian

fhchl commented 7 years ago

Hi Sebastian,

It's a great idea to merge the two packages and I would happily add you as a maintainer to this package. I am not sure, though, if my approach is the best way. The three most obvious ways seem to be using the linter package, the spell-checker package or doing it by hand. At the time, the latter seemed to be the only way to be able to choose from multiple suggestions, toggle LT checking off/on anytime and display some info on the spelling error. Also, I liked to hack a bit and learn about Markers etc. ...

Now, it seems that version 2 of the linter package has some functionality to choose between multiple suggestions, if I interpret the solutions attribute in the Message v2 API correctly. This could be a much smarter way, as we would not have to hassle around with the display of errors. v2 also allows for enabling and disabling specific linters at will.

One of us should try this out. What do you think?

Best, Franz

wysiib commented 7 years ago

I think we should avoid brewing our own solution and connect via the linter package or the spell-checker one. Hopefully maintenance overhead will be reduced that way?

In the next few days I will try to update my package to the linter v2 api. As I see it, we can either port your code for extraction of suggestions, etc. to my package or we can port your package to the linter api.

Do you know anything about the spellcheck api? I've never used it so I cannot judge if its a better way to proceed.

fhchl commented 7 years ago

Yes, lets connect to the linter v2 and see how that works. The problem with spell-checker was that you can not easily display the LT error messages along the suggestions. I find that information very useful. (At least I didn't figure out how to do it). Turning LT corrections on and off is also only possible by enabling/disabling the LT package, whereas I think we can specify the scopes in which the LT linter will be active (is that actually true?)

wysiib commented 7 years ago

I was able to connect to linterv2. however, the tests do not run through at the moment. Scopes can be specified using the linter. I will add you to the repository in a moment and push the linter v2 version even though tests are not running atm.