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

lsp: drop out of date diagnostics #2746

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Feb 27, 2020

Drop out of date diagnostics so that highlighting will not be applied
incorrectly.

Running :GoImports was causing errors sometimes and
causing highlighting to be applied on the wrong lines since it changed
the source. Since formatting with gofmt or goimports will change the
files, clear the diagnostic errors and warnings before reloading the
buffer so that the BufWinEnter autocmd doesn't try to set the matches to
the wrong locations.

Send changes to gopls after formatting with gofmt or goimports so that
gopls will have the current version.

Drop out of date diagnostics so that highlighting will not be applied
incorrectly.

Running :GoImports was causing errors sometimes and
causing highlighting to be applied on the wrong lines since it changed
the source. Since formatting with gofmt or goimports will change the
files, clear the diagnostic errors and warnings before reloading the
buffer so that the BufWinEnter autocmd doesn't try to set the matches to
the wrong locations.

Send changes to gopls after formatting with gofmt or goimports so that
gopls will have the current version.
@bhcleek bhcleek merged commit af0a13f into fatih:master Feb 27, 2020
@bhcleek bhcleek deleted the lsp/highlight-after-goimports branch February 27, 2020 02:59
bhcleek added a commit that referenced this pull request Feb 27, 2020
@bhcleek bhcleek added this to the vim-go 1.23 milestone Mar 3, 2020
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.

None yet

1 participant