Skip to content
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

fix: diagnostic.refreshOnInsertMode #1236

Merged
merged 1 commit into from
Oct 2, 2019

Conversation

clyfish
Copy link
Contributor

@clyfish clyfish commented Oct 2, 2019

  1. diagnostic.refreshOnInsertMode should work when diagnostic.displayByAle == true
  2. diagnostic.refreshOnInsertMode should work when diagnostics.length == 0

1. `diagnostic.refreshAfterSave` should work when `diagnostic.displayByAle == true`
2. `diagnostic.refreshAfterSave` should work when `diagnostics.length == 0`
@chemzqm
Copy link
Member

chemzqm commented Oct 2, 2019

diagnostic.refreshAfterSave should work when diagnostic.displayByAle == true

No, you should use ale to configure it.

diagnostic.refreshAfterSave should work when diagnostics.length == 0

It's intended to clear diagnostics earlier.

@chemzqm chemzqm closed this Oct 2, 2019
@clyfish
Copy link
Contributor Author

clyfish commented Oct 2, 2019

No, you should use ale to configure it.

I can't use ale to configure it.

My ale config:

let g:ale_lint_on_text_changed = 'never'
let g:ale_open_list = 1

@clyfish clyfish changed the title fix: diagnostic.refreshAfterSave fix: diagnostic.refreshOnInsertMode Oct 2, 2019
@clyfish
Copy link
Contributor Author

clyfish commented Oct 2, 2019

It's intended to clear diagnostics earlier.

If diagnostic.refreshOnInsertMode is true, the diagnostics should be cleared when leaving insert mode.

For example, I insert a character, and a diagnostic is cleared(diagnostics.length == 0), then I delete the character, the diagnostic won't restore(diagnostics.length == 1).

@chemzqm
Copy link
Member

chemzqm commented Oct 2, 2019

You're right.

@chemzqm chemzqm reopened this Oct 2, 2019
@chemzqm chemzqm merged commit a84f813 into neoclide:master Oct 2, 2019
chemzqm pushed a commit that referenced this pull request Oct 2, 2019
1. `diagnostic.refreshAfterSave` should work when `diagnostic.displayByAle == true`
2. `diagnostic.refreshAfterSave` should work when `diagnostics.length == 0`
@clyfish clyfish deleted the fix-refreshOnInsertMode branch October 6, 2019 11:08
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.

2 participants