Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Enhancement - Log instead of showing notifications when errors occur. #152

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello

Sometimes, when I'm typing incorrect PHP code (by accident, of course!), I get spammed with notifications that indexing failed or fetching the methods of something failed. I think we should consider just doing a console.error instead and not showing any notification, as linters already indicate when PHP code is incorrect. In other words, I already know something is wrong and linting is probably beyond the scope of this package.

Thanks in advance

Peekmo commented 9 years ago

I like this error, especially when I'm implementing interface, because I know that something is wrong, and linter can't know that.

Perhaps an option "Silent errors" in the plugin to active or not notifications on errors ?

Peekmo commented 9 years ago

Moreover, it indicates to the user that he will not have autocomplete on the current file ('cause there's a faile somewhere)

ghost commented 9 years ago

You are absolutely right about that. I had also thought about that, but it feels somehow like showing an Atom notification isn't the right solution, as it sometimes keeps spamming while you're still typing. However, I agree that it's still useful to have some kind of indicator for this.

Maybe it's a little far-fetched, but would it be an idea to implement a simple linter to do this? With 'simple' I mean just ride on atom-linter like linter-phpcs just sends messages from PHPCS output to the linter. Perhaps this is beyond the scope of this package?

What do you think?