SimpleComplete is a relatively simple plugin which allows you to add docstrings to variables, table members and functions, add tags/attributes for your docstrings, as well as have shorthands for importing any of Roblox’s services.
How To Enable
The SimpleComplete plugin has 2 buttons which can be used to toggle on/off its features:
For example, if you wish to enable just the docstrings, simply click it until it is dark.
To disable it, just click it again until it is bright
Docstring Declaration Syntax
To declare a docstring for functions, it is as simple as putting a comment ontop of it, like this:
This functionality already exists in vanilla Studio, however SimpleComplete does allow you to use all the tags and attributes within function docstrings.
However, for variables and table members, you must declare docstrings like this, with the <docstring>
tag:
Just putting a comment ontop won’t work.
Docstring Tags
Docstring tags add certain functionality to docstrings without needing any other value.
-
<deprecated>
- This tag simply crosses out the name for the item and hides it unless specifically searched for.
- This tag simply crosses out the name for the item and hides it unless specifically searched for.
-
<client_only>
- This tag makes it so that if the item is being accessed from somewhere other than a LocalScript or a Client RunContext script, it will not register as an autocomplete choice.
- This tag makes it so that if the item is being accessed from somewhere other than a LocalScript or a Client RunContext script, it will not register as an autocomplete choice.
-
<server_only>
- This tag makes it so that if the item is being accessed from somewhere other than a non-Client RunContext Script, it will not register as an autocomplete choice.
- This tag makes it so that if the item is being accessed from somewhere other than a non-Client RunContext Script, it will not register as an autocomplete choice.
-
<plugin_only>
- This tag makes it so that if the item is being accessed from somewhere other than a script with Plugin permissions, it will not register as an autocomplete choice.
- This tag makes it so that if the item is being accessed from somewhere other than a script with Plugin permissions, it will not register as an autocomplete choice.
-
<cmd_line_only>
- This tag makes it so that if the item is being accessed from somewhere other than the command line, it will not register as an autocomplete choice.
- This tag makes it so that if the item is being accessed from somewhere other than the command line, it will not register as an autocomplete choice.
-
<corescript_only>
- This tag makes it so that if the item is being accessed from somewhere other than a CoreScript, it will not register as an autocomplete choice.
- This tag makes it so that if the item is being accessed from somewhere other than a CoreScript, it will not register as an autocomplete choice.
-
<cursor_after_parens>
- This tag will add
()
after the autocompleted variable, and put the cursor after the)
.
- This tag will add
-
<cursor_in_parens>
- This tag will add
()
after the autocompleted variable, and put the cursor after the(
.
- This tag will add
Docstring Attributes & Syntax
There is a special syntax for docstring values.
- Strings
- Attribute strings are declared via $…$ for single line, and $$…$$ for multiline.
Example:
- Attribute strings are declared via $…$ for single line, and $$…$$ for multiline.
- Booleans
- Attribute booleans are declared the same way as strings, but with $true$ or $false$ as the value.
- Attribute booleans are declared the same way as strings, but with $true$ or $false$ as the value.
- Numbers
- Attribute numbers are declared the same way as strings, but with $n$ as the value.
Example:
- Attribute numbers are declared the same way as strings, but with $n$ as the value.
Docstring attributes add certain functionality to docstrings using a provided value.
-
<override_docstring>: @string
- This attribute sets the docstring to the string.
- This attribute sets the docstring to the string.
-
<code_sample>: @string
- This attribute sets the code sample part of the docstring to the string.
- This attribute sets the code sample part of the docstring to the string.
-
<learn_more>: @string
- This attribute sets the “Open Documentation” link of the docstring to the specified url string.
Note that if the url is not Roblox’s own documentation website, it will not display.
- This attribute sets the “Open Documentation” link of the docstring to the specified url string.
-
<preselect>: @bool
- I have no idea what this does, but I added it anyway :V
- I have no idea what this does, but I added it anyway :V
-
<detail>: @string
- Sets the detail part of the docstring to the string.
Example:
- Sets the detail part of the docstring to the string.
-
<num_overloads>: @number
- Sets the #overloads part of the docstring to the number.
- Sets the #overloads part of the docstring to the number.
-
<kind>: @string
- Sets the Enum.CompletionItemKind of the item to the string.
Example:
- Sets the Enum.CompletionItemKind of the item to the string.
Service Shorthands
Service shorthands can be used to quickly import Roblox services:
To change the “shorthand symbol”, simply type --?service-shorthand
and then the symbol you wish to use, like so:
Note that the symbol currently cannot be multicharacter
Example:
Get SimpleComplete here! →
If you wanna donate to me for my work, feel free to do so here! →
Any donations mean alot to me and means I can make more stuff