atom / atom-languageclient

Language Server Protocol support for Atom (the basis of Atom-IDE)
https://ide.atom.io/
MIT License
389 stars 78 forks source link

Prevent showMessage spam + add projectPath to showMessage detail #177

Closed alexheretic closed 6 years ago

alexheretic commented 6 years ago

This pr improves window/showMessage -> notification handling.

Servers can resend the same error message, in this case it isn't much help to repeat the notifications. We also currently lack an indication of which project the notification relates to.

Before

After

laughedelic commented 6 years ago

I made a hacky workaround for this problem: https://github.com/laughedelic/atom-ide-scala/pull/22, but it can deduplicate a notification only after it's already shown:

2017-12-10 05 37 19

So this solution is so much better! 💯It addresses the problem at the right place.

damieng commented 6 years ago

This looks great, thanks @alexheretic !

daviwil commented 6 years ago

Hey @alexheretic, do you mind syncing latest master and reapply your changes there? We've converted the codebase to TypeScript so you'll need to put these changes in the .ts version of the files you were editing. I believe your changes should apply pretty cleanly. Once that's done we can merge this in.

Thanks a lot!

alexheretic commented 6 years ago

No problem, I'll convert it tomorrow

daviwil commented 6 years ago

Thanks a lot for putting up with that change :) Merging now!