SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Features and/or Improvements => Topic started by: mktschudi on September 29, 2022, 06:49:44 PM

Title: Is there a way to add JSDoc "@returns" to color formatting?
Post by: mktschudi on September 29, 2022, 06:49:44 PM
While editing TypeScript or JavaScript, SE formats "@return" as a keyword in a function description. My company uses the alias "@returns", which isn't formatted.  Can you add the alias?  Is there a place for me to patch it in?
Thanks!
Title: Re: Is there a way to add JSDoc "@returns" to color formatting?
Post by: patrick on September 30, 2022, 01:07:20 PM
There is a color coding profile for JavaDoc doc comments where you can add this.

With a javascript file open, go to Document -> Javascript Options, and click on the "Color Coding" entry.   At the top of the Color Coding page, there's a pull down for "Profile".  Click on that, and select JavaDoc.  Now it should show the @keywords for javadoc, and you can click on "Add Words..." to add @returns.  And hit OK, and then @returns should be color coded in JavaDoc for all languages, not just TypeScript.


Title: Re: Is there a way to add JSDoc "@returns" to color formatting?
Post by: mktschudi on September 30, 2022, 05:51:55 PM
Thank you, Patrick!  I understand the options page better now.

One additional step: I needed to re-select the profile for JavaScript after modifying the JavaDoc profile.  Otherwise, my JavaScript file gets formatted as JavaDoc.   :)
Title: Re: Is there a way to add JSDoc "@returns" to color formatting?
Post by: patrick on September 30, 2022, 08:52:29 PM
Ach, I left that out.  Sorry about that, I'm glad you caught that.