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.
Documentation
Table Of Contents
Commands
Docstrings
Docstring Tags^
Docstring Syntax/Attributes^
Auto-Imports
Service^
Module^
Snippets
Commands
The command line can be used to set/get certain settings of SimpleComplete.
Syntax:
--sc #COMMAND_NAME: #SETTING_NAME; #SETTING_VALUE?
There are a variety of commands for SimpleComplete, heres a list of all of them:
Command Name | Args and Format | Description |
---|---|---|
setlocal: |
settingName; value |
Sets the local (current place) value for the setting. |
getlocal: |
settingName |
Gets a local value for the setting. |
setglobal: |
settingName; value |
Sets the global (all places/default) value for the setting. |
getglobal: |
settingName |
Gets a global value for the setting. |
reset: |
`local | global` |
exportsettings: |
`local | global` |
getsettings: |
`local | global` |
You can also chain command calls by wrapping them in parentheses, like so:
Very effichient!!!
Table of setting names, default values and possible values:
#define Casing as "PascalCase" | "CamelCase" | "SnakeCase" | "LoudSnakeCase" | "UpperCase" | "FlatCase"
Setting Name | Default Value | Possible Values |
---|---|---|
ModuleAncestors |
" " | any-string |
ImportShorthand |
“!” | any-string |
ModuleAncestorTag |
“SC_Ancestor” | any-string |
FindShortestPath |
“true” | “true” | “false” |
ImportSort |
“off” | “off” | “descending” | “ascending” |
ModuleSearchMode |
“descendants” | “descendants” | “children” |
SnippetModulePath |
“” | any-string |
SnippetShorthand |
"" | any-string |
ImportTransformMod |
“PascalCase” | Casing |
ImportTransformSer |
“PascalCase” | Casing |
Docstrings
Docstrings
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
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.
@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.
@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.
@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.
@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.
@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.
@cursor_after_parens
- This tag will add
()
after the autocompleted variable, and put the cursor after the)
.
@cursor_in_parens
- This tag will add
()
after the autocompleted variable, and put the cursor after the(
.
Docstring Syntax/Attributes
Docstring Syntax/Attributes
There is a special syntax for docstring values.
- Strings
- Attribute strings are declared via $…$.
Example:
2. Booleans
- 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:
Docstring attributes add certain functionality to docstrings using a provided value.
@override_docstring #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.
@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.
@preselect #bool
- 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:
6.
@num_overloads #number
- Sets the #overloads part of the docstring to the number.
@kind #string
- Sets the Enum.CompletionItemKind of the item to the string.
Example:
Auto-Imports
Auto-Imports
SimpleComplete offers a convenient system of auto-importing services and modules from tagged ancestors/ancestors list
To get access to auto imports, you must first set a shorthand for it. It is !
by default, however can be configured via the --?import-shorthand (symbol_here)
directive or the plugin setting ImportShorthand
. Its value can be set to nil
if you want it to appear with no prefix symbol
If you select an autocomplete suggestion for an auto-import (these typically have a snippet/enum icons), the name will be filled out on your current line, and the variable will be defined somewhere on the top.
Docstrings
There are also module auto imports, which are defined by several settings.
The first are ModuleAncestors
and ModuleAncestorTag
, both determine what ancestors to search thru for modules.
ModuleAncestors
has a directive form, --?module-ancestors {...paths}
, and a plugin setting, ModuleAncestors
ModuleAncestorTag
is a plugin setting, and determines the tag for items which will be searched for modules.
The last setting is ModuleSearchMode
which determines if searching will be done recursively (descendants) or shallowly (children)
Snippets
Snippets
Snippets are one of the cooler features of SimpleComplete, which allow you to define custom blocks of text which you can fill out in just 1 click.
In order to define your snippets, you must first create a ModuleScript to store them (as seen above), then set your SnippetsModulePath
setting to its path, like so:
And then the snippets can be accessed via a shorthand symbol, which you can configure via the --?snippet-shorthand (symbol_here)
directive or via the plugin setting SnippetShorthand
Like import shorthands, this can also be set to nil
.
Example:
Get SimpleComplete here! →
SimpleCompleteU15.rbxmx (124.4 KB)
(broken link, waiting for roblox to unblacklist me from publishing :((((( )
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