jvolkman / intellij-protobuf-editor

Protocol Buffers for IntelliJ-based IDEs
Apache License 2.0
122 stars 15 forks source link

Autocomplete for import statements lacks `;` character at the end #9

Open sirkon opened 4 years ago

sirkon commented 4 years ago

Hi! Thank you very much for this work, the plugin is really great.

Yet, there's a tiny annoyance on autocomplete for import statements.

Look at the screencast:

https://youtu.be/HKkJXtfhLgM

You see, the import statement appears without a final ; although it is mandatory.

jvolkman commented 4 years ago

Hi. Thanks for the report and screencast. It seems like a reasonable request, but I would like to make sure it aligns with common behavior of other editors in the IntelliJ ecosystem. I played with the Java import statement and found that it does not automatically insert the ;. Have you seen this behavior elsewhere?

jvolkman commented 4 years ago

Actually, it looks like the Java editor supports accepting a completion and inserting the ; by hitting the ; key instead of enter. Would that work for you?

sirkon commented 4 years ago

I guess this would be a bit more convenient indeed. Although you are right about languages with ;, CLion doesn't automatically put ; for

std::cout << "Hello world!"
jvolkman commented 4 years ago

So it turns out that hitting ; also works in the import autocomplete, but the semicolon is inserted inside the quotes. So far I haven't figured out how to modify that behavior.