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

Address #4165: provide a highlight group for the detailed diagnostic popup #4166

Merged
merged 1 commit into from Sep 12, 2023

Conversation

Aster89
Copy link
Contributor

@Aster89 Aster89 commented Jul 22, 2023

This seems to work, but I have a few questions

  • What tests should I look at to understand how to write one for this change?
  • Are you happy with the name YcmErrorPopup?
  • What should I set as 'priority', 'combine', 'override'?

PR Prelude

Thank you for working on YCM! :)

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your PR:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have included tests for the changes in my PR. If not, I have included a
    rationale for why I haven't.
  • I understand my PR may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Why this change is necessary and useful

See #4165 and conversation on gitter.


This change is Reviewable

@Aster89
Copy link
Contributor Author

Aster89 commented Jul 22, 2023

As regards the test, I've searched for ErrorMsg in the test directory, thinking I would find one asserting that's the highlight group used for the popup, but I found no match.

@puremourning
Copy link
Member

I guess search the tests for the option that makes this a popup? I'm not entirely sure we have tests for this tbh.

@puremourning
Copy link
Member

Are you happy with the name YcmErrorPopup?

Yep, though maybe 'Diagnostic' as it might not be an error (it might be a warning).

What should I set as 'priority', 'combine', 'override'?

I dunno. Check vims docs. I'm never entirely sure.

Copy link
Member

@puremourning puremourning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM tbh

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: 0 of 2 LGTMs obtained (waiting on @Aster89)


autoload/youcompleteme.vim line 517 at r1 (raw file):

  if !hlexists( 'YcmErrorPopup' )
    if hlexists( 'ErrorMsg' )

is there a reason this wouldn't exist?

@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #4166 (eddba4f) into master (4f1dcf4) will increase coverage by 0.09%.
The diff coverage is 100.00%.

❗ Current head eddba4f differs from pull request most recent head f742ecb. Consider uploading reports for the commit f742ecb to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4166      +/-   ##
==========================================
+ Coverage   88.82%   88.92%   +0.09%     
==========================================
  Files          34       34              
  Lines        4395     4397       +2     
==========================================
+ Hits         3904     3910       +6     
+ Misses        491      487       -4     

Copy link
Contributor Author

@Aster89 Aster89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What else was to be done here?

Reviewable status: 0 of 2 LGTMs obtained (waiting on @puremourning)


autoload/youcompleteme.vim line 517 at r1 (raw file):

Previously, puremourning (Ben Jackson) wrote…

is there a reason this wouldn't exist?

I don't remember anymore why I did it :'(

@Aster89
Copy link
Contributor Author

Aster89 commented Aug 18, 2023

is there a reason this wouldn't exist?

But I guess since ErrorMsg hl group exists, maybe this if was really a blunder of mine :/

@puremourning
Copy link
Member

Yeah I don't like the if unless we know why it's needed. Maybe ErrorMsg is optional?

@Aster89 Aster89 force-pushed the master branch 2 times, most recently from 057ff8b to b2b9c9a Compare August 18, 2023 19:24
Copy link
Member

@puremourning puremourning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: 1 of 2 LGTMs obtained (waiting on @Aster89)

@Aster89
Copy link
Contributor Author

Aster89 commented Aug 18, 2023

Yeah I don't like the if unless we know why it's needed. Maybe ErrorMsg is optional?

Looking at the other file, you were giving for granted that ErrorMsg existed, so I don't understand why I should do otherwise. Happy to remove it.

@Aster89
Copy link
Contributor Author

Aster89 commented Aug 24, 2023

Don't you merge this?

@puremourning
Copy link
Member

Sorry I had to click to approve the CI run

@puremourning puremourning added the Ship It! Manual override to merge a PR by maintainer label Aug 25, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 25, 2023

Thanks for sending a PR!

Copy link
Member

@puremourning puremourning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 2 LGTMs obtained (waiting on @Aster89)

a discussion (no related file):
Please update docs.


@puremourning puremourning removed the Ship It! Manual override to merge a PR by maintainer label Aug 25, 2023
@bstaletic
Copy link
Collaborator

@Aster89 The docs should be updated in the README.md too.

Usually, YCM the README.md gets updated and then vimdocs get auto-generated with a script (and a bot).

@Aster89
Copy link
Contributor Author

Aster89 commented Aug 26, 2023

@Aster89 The docs should be updated in the README.md too.

Usually, YCM the README.md gets updated and then vimdocs get auto-generated with a script (and a bot).

Good now?

Copy link
Collaborator

@bstaletic bstaletic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: 0 of 2 LGTMs obtained (and 1 stale) (waiting on @Aster89 and @puremourning)


autoload/youcompleteme.vim line 520 at r4 (raw file):

  endif
  if s:PropertyTypeNotDefined( 'YcmErrorProperty' )
    call prop_type_add( 'YcmErrorProperty', {

Is it just me or can YCM never reach this line?

The property type named YcmErrorProperty was first defined on line 439.

@Aster89 Aster89 requested a review from bstaletic August 27, 2023 08:34
@Aster89
Copy link
Contributor Author

Aster89 commented Aug 27, 2023

Reviewed 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: 0 of 2 LGTMs obtained (and 1 stale) (waiting on @Aster89 and @puremourning)

autoload/youcompleteme.vim line 520 at r4 (raw file):

  endif
  if s:PropertyTypeNotDefined( 'YcmErrorProperty' )
    call prop_type_add( 'YcmErrorProperty', {

Is it just me or can YCM never reach this line?

The property type named YcmErrorProperty was first defined on line 439.

Removed

Copy link
Collaborator

@bstaletic bstaletic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 2 files at r1, 1 of 1 files at r5, all commit messages.
Reviewable status: 1 of 2 LGTMs obtained (and 1 stale) (waiting on @Aster89 and @puremourning)

…gnostic popup

This seems to work, but I have a few questions

  - What tests should I look at to understand how to write one for this
    change?
  - Are you happy with the name `YcmErrorPopup`?
  - What should I set as `'priority'`, `'combine'`, `'override'`?
@Aster89
Copy link
Contributor Author

Aster89 commented Sep 11, 2023

Hi, do I need to do anything else here?

Copy link
Member

@puremourning puremourning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r3, 1 of 1 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: 1 of 2 LGTMs obtained (and 1 stale) (waiting on @Aster89)

Copy link
Collaborator

@bstaletic bstaletic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed all commit messages.
Reviewable status: :shipit: complete! 2 of 2 LGTMs obtained (waiting on @Aster89)

@mergify
Copy link
Contributor

mergify bot commented Sep 12, 2023

Thanks for sending a PR!

@mergify mergify bot merged commit abea6de into ycm-core:master Sep 12, 2023
13 checks passed
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

3 participants