ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
735 stars 120 forks source link

Enhance keyword completion #575

Open deadok22 opened 9 years ago

deadok22 commented 9 years ago

Currently, some of the pre-defined live template names are the same as keyword names. So when the user types, for example, erlang foo() -> if<caret>, he gets several completion variants among which there is a live template if and a keyword if with the live template pre-selected. I think, inserting a live template is not a common case scenario, so the behavior is inconvenient.

I propose removing some of the live templates, compensating with improved keyword completion. By completion improvements I mean reusing enter handler logic in order to automatically add \n\n end after a keyword where appropriate.

ignatov commented 9 years ago

Please see https://github.com/go-lang-plugin-org/go-lang-idea-plugin/blob/master/src/com/goide/completion/GoKeywordCompletionContributor.java