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

LSP4Jakarta and LSP4MP snippets show up inside commented sections of code #466

Open
1 of 4 tasks
TrevCraw opened this issue Jun 5, 2023 · 2 comments
Open
1 of 4 tasks
Labels
bug Something isn't working

Comments

@TrevCraw
Copy link
Contributor

TrevCraw commented Jun 5, 2023

Description:

  • This behaviour is seen in VS Code and Eclipse
  • LSP4MP snippets show up if there is a space after the “//” comment start - same behaviour for block comments
  • LSP4Jakarta snippets show up with or without a space

Type of language feature proposed:

Select all that apply

  • diagnostic
  • quick-fix
  • snippet
  • other, please specify:
@turkeylurkey turkeylurkey added the bug Something isn't working label Jun 5, 2023
@evie-lau
Copy link
Contributor

evie-lau commented Jun 7, 2023

Edit: IntelliJ only - may mark as off-topic as the logic may be different

I'm seeing that comments show field/method snippets depending on context, depending on whether the comment is above an item with/without annotations.

Some vague guidelines below, which may not be 100% accurate, but seems to follow this most of the time:

  1. If above field/method WITH existing annotations, no snippets show for both single/multi line comments. (this also applies to empty lines above that method.

  2. If above field/method WITHOUT annotations, or at end of class below everything else.

As stated above, when Jakarta snippets show, it's regardless of whitespace, and also regardless of single/multi line comment.

@mezarin
Copy link
Contributor

mezarin commented Jun 7, 2023

Snippets (MP or Jakarta) are not shown after a block comment:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants