LSP4Jakarta and LSP4MP snippets show up inside commented sections of code
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:
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:
-
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.
-
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.
Snippets (MP or Jakarta) are not shown after a block comment: