Hi, i can replicate the issue, will be fixed in next patch
Patch 16.3:
-
The old functionality of ânilâ in settings has been replaced by âvoidâ, ânilâ is now an actual setting value which you can use for import and snippet shorthands
Setting a setting to âvoidâ will set it to actual nil, I know a bit confusing but i couldnt think of a better solution -
Added a new command,
reset: local | global
. If the value is local, then the local settings will be synced with the global one. Else, the global setting values will be set to the default values.
What is this supposed to mean lol, do I use âvoidâ instead of ânilâ for the previous nil behavior?
So⌠I can type nil as a shorthand?
No, u still use nil to represent âno shorthandâ, but void for âno settingâ iylwim
Ah ok, so setting it to void will clear the setting from the storage entirely?
Yea and itll use the global one instead if its local
--sc exportsettings: global
still outputs as a local command
nil as a shorthand just does not work (ironically voiding it gives the intended behavior for nil)
setting a setting to void just makes it impossible to use until you restart studio
Yea my bad xd
Did you download the new update? Fixed it after i realized the same
Yeah iâll work on making it set to the default value when used on global settings instead of just removing it
Patch 16.5:
-
--sc exportsettings: global
now usessetglobal
- Setting a global setting to
void
now sets its value to the default value - Using
.
or:
as import shorthands now no longer prevent you from doing member accesses
Patch 16.6:
- Doing auto imports inside method call parens (e.g, | = cursor,
game:GetService(:|)
) now work, and also now imports wont show up when doinggame:GetService(...):|
(dont ask me how long this took me) (Same thing works for . which means you can have . as a snippet and/or import shorthand!)
Patch 16.7:
- Fixed
nil
import shorthands just straight up not working (prefix matching issue) aswell as some minor performance issues and bugs
There should be a trigger or option or something to not automatically create a variable if youâre in the process of defining one. I know this behavior is desired in some scenarios, perhaps to access something in the module (.new), but sometimes you may not want the variable to be named the same as the module.
Quick example:
current
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AnimationController = require(ReplicatedStorage.Utils.AnimationController)
local SimpleAnimate = AnimationController
new
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SimpleAnimate = require(ReplicatedStorage.Utils.AnimationController)
I donât really know how this would be implemented though, like maybe a RequireShorthand
instead of an ImportShorthand
?
That means 3 shorthands will exist thoughâŚ
I donât either lol, either a shorthand or a simple toggle
orrrr⌠a custom directive?
i like to think of snippets as itâs own thing
you also didnât implement the context checker btw
if you can, make it so client scripts cannot require things like serverscriptservice and serverstorage, and by extension modules there
a tag to EXCLUDE modules from results would also be nice
Right, will add this in update 17 when I finish fixing some issues with SimpleZone xd
Update 17:
-
If the current script is a localscript/script with client runcontext, modules under ServerStorage and ServerScriptService will be blocked from auto import always, same thing for the services themselves.
-
Added the
ModuleExcludeTag
which isSC_Ignore
by default, modules tagged with this tag wonât be considered when searching (Might also add aModuleIncludeTag
) -
Fixed a bug where using an import shorthand right after another symbol eats it (e.g
(!Pla)
=>Players)
)
SC_Ancestor but not
now that I think about it, you can probably add the idea I suggested in the form of an attribute
SC_VarName or something with the value being what the variable should be called
Module ancestors are still useful when you wanna be able to access entire folders of modules without tagging everything, but this include tag will be useful for modules which you wanna include individually :V
Iâll think about it
keep in mind that if you add this, there should probably also be a setting to change what the autocomplete callback is too