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: keep diagnostics highlighting on format #2779

Merged
merged 2 commits into from
Mar 20, 2020

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Mar 19, 2020

fmt: add tests for highlighting gopls diagnostics

Add tests for highlighting gopls diagnostics:

  • verify diagnostic highlights when a file is changed by gofmt on save.
  • verify diagnostic highlights when a file is saved and not changed by
    gofmt.
  • verify diagnostic highlights when a file is reloaded.

Cleanup a file added by gotest#write_file that was previously left
around.

Add a # Please enter the commit message for your changes. Lines starting

fmt: preserve gopls diagnostic highlighting

Preserve highlight of gopls sourced diagnostics when formatting.

Use has('textprop') instead of exists('*prop_remove') to determine
whether to use text properties.

Try to preserve column after formatting by shifting the cursor over when
the line has indentation added.

Fixes #2753

Add tests for highlighting gopls diagnostics:
* verify diagnostic highlights when a file is changed by gofmt on save.
* verify diagnostic highlights when a file is saved and not changed by
  gofmt.
* verify diagnostic highlights when a file is reloaded.

Cleanup a file added by gotest#write_file that was previously left
around.

Add a # Please enter the commit message for your changes. Lines starting
Preserve highlight of gopls sourced diagnostics when formatting.

Use `has('textprop')` instead of exists('*prop_remove') to determine
whether to use text properties.

Try to preserve column after formatting by shifting the cursor over when
the line has indentation added.
@bhcleek bhcleek merged commit 898ebbd into fatih:master Mar 20, 2020
@bhcleek bhcleek deleted the lsp/highlight/after-save branch March 20, 2020 17:00
bhcleek added a commit that referenced this pull request Mar 20, 2020
@bhcleek bhcleek added this to the vim-go 1.23 milestone Mar 22, 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.

vim-go highlighting of gopls diagnostics not updating on write
1 participant