SimpleCompleteU15.rbxmx (131.9 KB) | Marketplace (BROKEN) | Donate 80 Robux
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.
Commands
Commands
The command bar can be used to set/get certain settings of SimpleComplete.
Syntax:
--sc #COMMAND_NAME: #SETTING_NAME; #SETTING_VALUE?
To execute a command, simply put it inside the command bar and press enter. A message should appear in output to indicate if it was successful or if it failed.
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 |
Sets your local settings to nil so you are using the global settings. |
exportsettings: |
local | global |
Returns a command you can call to set your settings to the current global/local settings. |
getsettings: |
local | global |
Returns your global/local settings in table format for visualization. |
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 | Description |
---|---|---|---|
ModuleAncestors |
" " | string-tuple | A list of instance paths (relative to game or script ) which will be searched for modules for auto import. |
ImportShorthand |
“!” | string | “nil” | A symbol which when typed in will give all auto import suggestions |
FindShortestPath |
“true” | “true” | “false” | A boolean to indicate wether or not the plugin should find the shortest path (either game or script relative) when parsing module import paths |
ImportSort |
“off” | “off” | “descending” | “ascending” | Indicates how auto import definitions should be sorted |
ModuleSearchMode |
“descendants” | “descendants” | “children” | Indicates how module ancestors (defined by ModuleAncestors and AncestorIncludeTags ) will be searched for modules |
SnippetModulePath |
“” | string | “nil” | Determines the path for your module which contains your snippets. |
SnippetShorthand |
“\” | string | “nil” | A symbol which when typed in will give all snippet suggestions |
ImportTransformModule |
“PascalCase” | Casing | Determines how module auto-imports will be cased |
ImportTransformService |
“PascalCase” | Casing | Determines how service auto-imports will be cased |
ModuleIncludeTags |
“Server, Client” | string-tuple | A list of tags which are applied to ModuleScripts. If the currently open document has the same tag as the module, it will be auto-imported. |
TagExcludeBehaviour |
“otherGroups” | “otherGroups” | “all” | “none” | WIP |
Gallery:
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:
Happy coding!
- Yes
- I haven’t tried
- No
0 voters