-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support for User autocmd #14
Comments
This could potentially eliminate the need for autocmd User AccioPost if empty(getqflist()) | cclose | else | copen | endif |
Yea I've been letting this one bake for a while. It's basically done, but I'm still not satisfied with the granularity of the autocommands. I've been playing with Technically, the NoErrors autocommand isn't needed since you could figure out there are no errors by calling I do like the idea though of using the autocommand to replace I personally found the quickfix list popping open randomly really annoying, which is why I turned it off by default, but opening the quickfix list automatically might not make much sense in an async plugin. I implemented it because it was useful in syntastic, but that may have been because syntastic was synchronous and you had to wait for the checker to finish running anyway. In that case, having the location list window open up was a convenient indicator that the checker had finished running but Accio doesn't share that limitation. I can't really imagine any scenario where someone would want the quickfix list to randomly open while they're navigating around their files... |
Yeah, it's possible that My first impression is that I'd rather have a single point of entry (a single autocommand) and a flexible way to query Accio about its state than to have many points of entry themselves carrying state information. But if the common case is doing something only when there are no errors (as in closing the quickfix window), I might see value in an I don't think I'd have much use for compiler-specific events, personally. I guess it would provide an interesting way to chain compilers ("if there are no syntax errors then run my style checker"): autocmd User AccioNoErrors_mri Accio rubocop But this is probably not something I would take advantage of myself. |
This can allow users to hook into the event that a buffer has no errors,
possibly to generate tags files whenever a file passes syntax/style checks for
example.
The text was updated successfully, but these errors were encountered: