IntelliJ IDEA Code Completion for Knockout data-bind attributes

  • In your project settings (even though Language Injections are global, they are defined in the project settings) select Language Injections
  • Click New then XML Attribute Injection
  • Then fill it out the dialog as follows (see screenshot below)
  • ID is the language type (JavaScript in our case)
  • Prefix/Suffix are used to make the data-bind string valid JavaScript code
  • Local Name indicates the attribute name where the Language Injection applies.

knockout-code-completion-screenshot

References
https://studgeek.com/2010/08/16/intellijidea-webstorm-knockout-data-bind-attributes/