Custom Function Comments Plugin

About

Gain access to all of the hidden comment features used by official roblox api and more through custom html flags/blocks in function comments.

API

  • <custom> = Marks a function response for custom flags. This must be the first word of your comment
  • <dep> = Adds the Enum.CompletionItemTag.Deprecated tag to your function response, marking it as deprecated (strikethrough).
    • [NOTE]: This will entirely hide the autocomplete response if your function is under a table. This is likely a bug with the official deprecation tag implementation. However, you can alternatively use this bug as a way to intentionally hide private table function autocomplete responses.
  • <doc>link</doc> = Adds an embeded documentation link to your comment.
    • [NOTE]: Unfortunately, Roblox will only embed links under their own domain at the moment.
  • <cs> = Treats everything in the comment under the flag as an official code sample, embedding it as such.
    • [NOTE]: If your code sample has scopes, you must convert the indentation to spaces, as all tabs are filtered out when parsing through a code comment
  • <nb>…</nb> = Replaces all line breaks within the block with a space, preventing your comment from being abruptly cutoff.
    • [NOTE]: You are not required to close a “NoBreak” block (</nb) - purposefully omitting it will apply the effects to the remaining portion of the string, essentially giving it the functionality of a flag.
  • <md> = Marks your comment for markdown syntax parsing to automatically translate into the equivalent html block.
    • [NOTE]: Markdown blocks must be closed, incomplete markdown syntax will not be recognized. Use \ before markdown characters to use them normally (i.e \* or \**)
    • The current list of supported markdown syntax is: (Note that these are the only ones possible at this moment given the html tags roblox will embed)
      • **text** for bold text (<strong>)
      • *text* for italic text (<em>)
      • ^text^ for ˢᵘᵖᵉʳˢᶜʳᶦᵖᵗ (<sup>)
      • `text` for code (<code>)

Gallery

Setup

Plugin Link: Custom Function Comments

12 Likes

This actually looks really useful, just wondering, does this work with the Show Deprecated Objects (or whatever it’s called) setting?

This is using the official deprecated autocomplete response tag, so if normal deprecated functions follow that setting, this should too.

1 Like

Update V1.1

  • Added a markdown html flag to parse your comment for markdown syntax to automatically translate into the equivalent html block.
    The current list of supported markdown syntax is: (Note that these are the only ones possible at this moment given the html tags roblox will embed)
    • **text** for bold text (<strong>)
    • *text* for italic text (<em>)
    • ^text^ for ˢᵘᵖᵉʳˢᶜʳᶦᵖᵗ (<sup>)
    • `text` for code (<code>)
  • [Note]: Markdown blocks must be closed, incomplete markdown syntax will not be recognized. Use \ before markdown characters to use them normally (i.e \* or \**)
  • Furthermore, every custom html tag/block will remove a trailing line break following its invocation to allow for a common usage pattern where line breaks are immediately used after a tag/block for readability

If you have any further suggestions for this plugin, don’t hesitate to recommend them in this thread!

4 Likes

Update V1.2

1 Like