lsp4jakarta icon indicating copy to clipboard operation
lsp4jakarta copied to clipboard

LSP4Jakarta and LSP4MP snippets show up inside commented sections of code

Open TrevCraw opened this issue 2 years ago • 2 comments

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
  • [x] snippet
  • [ ] other, please specify:

TrevCraw avatar Jun 05 '23 01:06 TrevCraw

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.

evie-lau avatar Jun 07 '23 14:06 evie-lau

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

mezarin avatar Jun 07 '23 16:06 mezarin