eclipse / lsp4jakarta

Language Server for Jakarta EE
Eclipse Public License 2.0
33 stars 50 forks source link

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

Open TrevCraw opened 1 year ago

TrevCraw commented 1 year ago

Description:

Type of language feature proposed:

Select all that apply

evie-lau commented 1 year ago

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 commented 1 year ago

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