Skip to content

Add autocommands to notice linters #437

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

Merged
merged 2 commits into from
Oct 25, 2020
Merged

Add autocommands to notice linters #437

merged 2 commits into from
Oct 25, 2020

Conversation

n-p-e
Copy link
Contributor

@n-p-e n-p-e commented Oct 13, 2020

This change addresses #402 for linters that provide enable/disable commands.
I'm not very familiar with vimscript, so please check.

As mentioned in the #402, the best workaround so far is probably attach an autocommand to TextChanged and CursorMoved and manually check whether EasyMotion is active. This makes the process much simpler. Linter plugin authors can also easily support EasyMotion.

@haya14busa
Copy link
Member

Can we save/restore eventignore instead to avoid the issue?

@n-p-e
Copy link
Contributor Author

n-p-e commented Oct 25, 2020

Can we save/restore eventignore instead to avoid the issue?

I tried so, but doing set eventignore+=TextChanged doesn't seem to stop coc.

@haya14busa haya14busa merged commit 96f1d4a into easymotion:master Oct 25, 2020
@blayz3r
Copy link

blayz3r commented Oct 25, 2020

This change is causing this weird warning

image

@haya14busa
Copy link
Member

Thanks. I reverted the pr.

@smackesey
Copy link

I am using @jakelinzy's branch and I can't replicate this warning-- perhaps a difference between Vim and NeoVim (I'm on NeoVim)?

But in any case, pretty sure that the message is the result of a user having no autocommands defined for User EasyMotionPromptBegin and User EasyMotionPromptEnd when these events are emitted. The problem should be fixed by simply prepending silent to the doautocmd lines in the PR.

This PR introduced a really useful feature for dealing with the linter interference caused by easymotion, so I hope this gets remerged with the above change.

@n-p-e
Copy link
Contributor Author

n-p-e commented Oct 29, 2020

I am using @jakelinzy's branch and I can't replicate this warning-- perhaps a difference between Vim and NeoVim (I'm on NeoVim)?

You're right. I didn't notice this behaviour. My fault.

From Neovim :h vim_diff:

Commands:
:doautocmd does not warn about "No matching autocommands".

#440 Fixes this.

haya14busa added a commit that referenced this pull request Dec 17, 2020
Fix 'No matching autocommands' warning caused by #437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants