-
Notifications
You must be signed in to change notification settings - Fork 178
Indicate when one or more lint job is running #712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -32,6 +33,9 @@ class Linter | |||
|
|||
@subscriptions.add atom.workspace.observeTextEditors (editor) => | |||
currentEditorLinter = new EditorLinter @, editor | |||
currentEditorLinter.onLinting (linting) => | |||
@lintJobs += if linting then 1 else -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if linting then @lintsJobs++ else @lintsJobs--
But I think it's just preference of how to write it. (I find it clearer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find yours cleaner as well. It's just too late 😴
Added the proposed simplification and removed the fields prefixed with an underscore. |
while this PR looks good, you are not actually counting active linters, You are counting active editors that have linting in progress. |
@steelbrain You're right. What's wrong about that? |
@b52 the users will expect to see a number of active linters instead of active editor linters IMO |
Showing linters instead of editor linters there should be a fairly simple change, all you have to do is increment or decrement in |
@steelbrain: Pardon? I don't show any linters, thus the actual number doesn't matter. It's just important to check if any linter is running, and if so, show it. That is what I do, since I use the So, what is left for me to do? PS: I just made the sync icon rotate to illustrate even more that something is happening. |
LGTM. /cc @AtomLinter/linter |
The bottom bar is updated to show if at least one lint job is running. This is very helpful with larger projects where lint jobs might take some time. This is just my idea how one could visualize this state.
Since this is my first contact with Linter, I would argue that you should very extensive check that everything is in order.