Repository navigation
Releases
Releases · DaisyCatTs/SkriptZed
v0.3.1
Highlights
- Skript's load errors, before you load. "There's no player in a function event", empty sections, code after
stoporreturn, and mistyped events likeon jion:(with a fix) are flagged as you type. Each check stays silent when it cannot be sure, and the heuristic ones can be switched off. - Argument completion. After
kill,teleport player toorgive player, completion offers what fits that slot: event values, your locals, matching expressions and listed values like damage causes or biomes. Only the word you are typing is replaced. loop-values. Insideloop all players:, typingloop-offersloop-player; hover says which loop it refers to.- Doc comments.
#lines above a function, command or custom syntax, with@param,@returnand@deprecated, show in hover, signature help and completion. - Whole-project checks. Unknown functions, wrong argument counts and duplicate functions or commands are reported in scripts you do not have open.
- Option values inline.
{@prefix}shows its value next to it.
Fixes
- Pressing Enter at the end of a finished line could replace it with a completion suggestion. A finished line no longer shows one.
telnow suggests Teleport first, andcancel evsuggests Cancel Event.- Option values with spaces were cut short in completion and hover.
Full changelog
Added
- Argument completion. Once a statement's start identifies its syntax,
completion offers what fits the slot being typed:kill ploffers the
event'splayerand other entity expressions,teleport player to sp
offers Spawn (a location) and no entity-only expressions, a game mode slot
offerssurvivaland friends. Expressions are matched on their documented
return type, with a small table of well-known supertypes (a player is an
entity, a command sender and an offline player), and the trigger's locals
are offered when you ask with Ctrl-Space after a space. Accepting one
replaces only the word under the cursor, never the statement, and a word
that already spells out a value (kill player) opens no popup, so Enter
still starts a new line. - Doc comments. The
#lines directly above a function, command,
ClassySK method or skript-reflect definition are its documentation, shown
when you hover the declaration or any call, in completion, and in argument
hints, where each parameter carries its own text. Both conventions other
Skript editors use are read, so a documented file moves between editors
unchanged:@param,@return,@deprecated,@sinceand@example, and
the#d,#dp,#dr,#dexand#ddepfamily. A blank line detaches a
comment, and a###block counts when it closes directly above. A
@paramnaming no parameter is hinted, and a call to a@deprecated
function is struck through with the reason (switched off with the other
deprecation warnings bydeprecatedSyntaxDiagnostics). - Option values inline. With inlay hints on,
{@prefix}is followed by
the value the script'soptions:block gives it,= "&6[Shop]", cut short
past 30 characters. - "There's no player in a function event." Skript's most common load
error is now a warning as you type, in Skript's own words:player,
event-player,event-entity,event-block,attackerandvictim
inside a function, or in an event whose documented values can never supply
them (every 5 seconds,on world load). It stays silent wherever Skript
might accept the line: commands,on load(whose command sender passes
for a player), events with no documented values, addon events, sections
that run their body in an event of their own, and slots whereplayer
could be read as an entity type.eventValueDiagnostics: falseturns it
off. - Empty sections. A line ending in
:with nothing under it gets
Skript's own "Empty configuration section!" warning, following Skript's
reader exactly: a comment-only body counts as empty, and a#-#line
opens no section. - Unreachable code. Statements after a
stopor areturnin the same
block are faded and warned about, as Skript does on load. A script that
suppresses Skript's unreachable code warnings is left alone. - Mistyped events.
on jion:is reported as a structure Skript cannot
understand, with a quick fix to change it toon join. Only near-misses
of a known event are reported, and only once every addon in your
plugins/folder has its syntax loaded, so an addon's event is never
mistaken for a typo.unknownEventDiagnostics: falseturns it off. - Syntax newer than your server, opt-in. With
newerSyntaxDiagnostics: trueand the Skript version known, from the
detectedSkript.jaror theskriptVersionsetting, a line whose syntax
arrived in a later Skript is warned about with the version it needs. Older
syntax that also fits the line keeps it quiet. Off by default because
syntax a later Skript rewrote (Play Effect in 2.14) still reads as new. loop-completes the loop's own values. Insideloop all players:,
typingloop-offersloop-player,loop-entity,loop-valueand
loop-iteration; a list variable addsloop-index,loop 10 times
offersloop-number. Nested loops are numbered exactly where Skript
demands it (loop-value-1,loop-value-2) and nowhere else. Hovering a
loop-…name says which loop it refers to and what type it is, or that it
matches several loops, which Skript rejects.- Every listed value in argument completion. A slot whose type lists its
values offers them, ranked by what you typed: damage causes, biomes,
potion effect types, enchantments (also for%enchantment type%slots,
as insharpness 5), villager professions, game rules, teleport causes
and some forty more. Item and entity types stay out: their names are
open-ended aliases. - Diagnostics for scripts you do not have open. When a save, an edit, a
new or deleted file or agit pullchanges what the project declares, the
closed scripts that call or redeclare it are rechecked for unknown
functions, wrong argument counts and duplicates, so the project
diagnostics panel shows a caller you just broke, and clears it once fixed.
Only scripts inside the workspace are reported. Measured at about 12 ms for
a full pass over 300 scripts, so it is on by default;
features.projectDiagnostics: falseturns it off. - Duplicates across scripts. Two global functions with the same name and
the same parameter types (an overload by type is fine), two commands with
the same name, or two skript-reflect definitions with the same pattern are
warned about in both places, each linking to the other. - TODO, FIXME, XXX and NOTE stand out in comments, the tag word alone,
with semantic tokens on.
Fixed
- A script could be indexed twice under two spellings of its path. When
the editor and the project scan wrote the same file differently (~as
%7E, orC:asc:), the new cross-file checks saw the file as its own
duplicate. Paths are now compared in one normalised form. - Pressing Enter at the end of a line could replace it. The completion
popup was still open with a suggestion selected, and that suggestion stood
in for the whole statement although only its last word matched:
kill playerbecameplayer from uuids,teleport player to spawn
becamespawn entity types. A syntax suggestion now has to fit every word
of the statement from its start, and none is offered once a string,
variable or number has been written, so a finished line shows no popup and
Enter starts a new line. - Suggestions rank the syntax you are typing first.
teloffers Teleport
before Display Teleport Duration, andcancel evoffers Cancel Event
beforeevent-player. - An option's value was cut short. Completion and hover showed
prefix: &6[Shop] of the yearas&6; they now show the whole value.
Compare: v0.3.0...v0.3.1
v0.3.0
Highlights
- Addons understood. ClassySK classes, oopsk structs and skript-reflect custom syntax get outline entries, folding, hover, go-to-definition and colour, instead of errors.
- Skript 2.17. Subcommands parse, and the new command entries (
prefix,suggestions,subcommand,subcommands) complete and hover. - skript-minestom. A skript-minestom server is recognised from its folder and gets its own syntax and addons.
- Better hover. It describes what is under the cursor: an expression, a function, a variable,
selfor a class. - Variable completion. Locals, globals and list variables, one level at a time.
- New checks. Unknown options, wrong argument counts,
cancel eventwhere nothing can be cancelled, and local variables that are never set or never used. - Formatting. Format a selection, and one blank line between structures.
- Switches. Every feature can be turned off in a
featuressettings block, without a restart.
Optional, off by default
- SkAnalyzer: check each saved script against the real Skript.
- RCON reload: reload a saved script on your own server and see its errors in the editor.
- AI helper: a read-only MCP server (
skript-lsp mcp). The extension does not register it; the README shows how to add it.
Fixes
- With no settings at all, addon syntax never loaded.
- One invalid setting no longer resets the others, and
settingsno longer replacesinitialization_options. - A crash on deeply nested patterns, and one when hovering inside
§or other multi-byte characters. - Saving with SkAnalyzer on could freeze the editor.
- Addon patterns with regex character classes now match, and 181 addon entries are no longer dropped as duplicates of core syntax.
Downloads
skript-lsp for Windows, macOS (Intel and Apple Silicon) and Linux (x86_64 and ARM, glibc and musl). The extension downloads the right one by itself; these are for running the server yourself.
Full changelog
Added
Skript 2.17
- Subcommands.
subcommand <number>:inside a command was a parse error,
which broke the outline and folding for the whole file. Subcommands now
parse, directly in a command or inside asubcommands:group, and show in
the outline under their pattern. - The new command entries.
prefix:,suggestions:(also spelt
tab completions:),subcommandandsubcommands:complete and hover inside
a command, and inside each subcommand, which takes the same entries. Hovering
permission message:says it is deprecated since 2.17: a command the player
may not run is no longer sent to their client, so the message is never seen.
Four new snippets:commandsub,subcommand,subcommandsand
suggestions.
Addons
- ClassySK support. ClassySK adds
classes to Skript, and a ClassySK script used to be full of errors that could
not be fixed: every method, from its declaration toself::start()and
{_bar}::play(…), was reported as a call to an undeclared function. Now:class, fields, methods and their parameters appear in the outline, and a
class and each method fold.- Hovering a method or field shows its declaration
(SmartActionBar::play(value: string, duration: timespan)), and
go-to-definition and find-references follow it to the class. Members are
deliberately not renamed: which class{_x}::reset()calls is only known
at runtime, so renaming one class'sresetcould silently rewrite
another's. {_x}inside a method belongs to that method, so renaming it no longer
touches a variable of the same name in a sibling method.- Formatting keeps a class body indented instead of flattening it to
column 0. - Highlighting for
public/private/static/const, field and method
names,selfand::member access, plusclass,methodand
newinstancesnippets.
- oopsk support.
struct Message:templates parse as structures, with
their fields in the outline and folding, instead of being read as an event
whose fields were run through the statement matcher. - skript-minestom support. Open a skript-minestom server and it is
recognised from its folder layout: the server loads skript-minestom's own
syntax and every addon its docs site publishes (skript-gui, SkCheese,
skript-combat and more) instead of Bukkit Skript's."platform"set to
"minestom"or"bukkit"overrides the guess. - skript-reflect custom syntax is understood. An
effect,condition,
expression, property or customeventyour project defines,localones
included, is read as you type. Every use of it is then coloured, completed
and hovered like core syntax ("Defined inrewards.sk, line 12"), and
go-to-definition jumps to the definition. The outline lists definitions as
their own kind instead of as events, andlocal effect …:no longer breaks
the parse. - Addon section entries. Inside an addon section that SkriptHub documents,
such as SkBee'sregister shaped recipe:, completion offers its entries
(id:,result:,shape:and the rest) with the required ones you have not written
yet first, and hover explains each. Lines likeresult: diamondare no
longer reported as unknown syntax. - Check scripts against the real Skript (opt-in, needs SkAnalyzer and
Java 25). Setanalyzer.jarand each saved script is run through Skript's
own parser, and its errors appear as diagnostics fromSkAnalyzer.
"enabled": falsepauses it without losing the path. You install SkAnalyzer
and a Skratched Skript build yourself; see the README. - Reload on your own server as you save (opt-in, off by default). With
rcon.enabledand your server's RCON password, each save sends
skript reload <script>over RCON, and the errors Skript prints come back as
diagnostics fromSkript (server). Meant for a server on your machine or one
whose scripts folder you have mounted; see the README for what
server.propertiesand Skript's config need. The password is never logged. customSyntaxPathsaccepts folders, loading every.jsonin them.
Editor
- Hover explains what is under the cursor. Pointing at
{_p}'s helmet
inside asetdescribes Armor Slot, not Set. A function call shows that
function: your own function's signature, or a built-in likefloorwith its
documentation, where it used to describe whatever pattern the whole line
matched.selfand a class name show the class and its members, and addon
syntax shows examples from SkriptHub and a link to its page. - Expressions inside lines are coloured, not just the line's keywords. What
fills a pattern's slots, and every argument of a function call, is classified
too:{_p}'s helmet,future event-item,the target entity of player. A
literal-only slot such as thehelmetin{_p}'s helmetreads as a type.
Named arguments (updateEquip(p: {_p})), the class inEquipment::get(…)
and SkBee'sswitch/case/defaultare coloured too. - Variable completion. Typing
{_offers the local variables used in the
same trigger, plus the function's parameters;{offers those and every
global the project uses. A plain word works too:visoffers{_visitor}
ahead of any syntax. List variables complete one level at a time: after{data::
the choices are what your scripts put at that level (%player's uuid%,
settings) plus*. - Colour swatches.
&6,&x&f&f&5&5&5&5,<red>,<#ff5555>and the
rest show the colour they produce, and picking a new one writes it back in
the same style. - Clickable links in
<link:…>/<url:…>tags and bare URLs, comments
included. - Argument hints for more calls. Signature help covers ClassySK methods
(Req::get(), Skript's built-ins and addon functions, highlights the right
parameter for a named argument, and no longer splits a default like
(1, 7)in two. Zed hides these hints after a completion unless
"show_signature_help_after_edits": trueis set. - Unknown options are errors.
{@typo}with no matching entry in the
script'soptions:block is reported, with a quick fix that adds it. - Wrong argument counts are errors.
reward()whenrewardneeds a
player, orgiveCoins(p, 5, 6)when it takes two, is reported, checked
against your own functions and Skript's built-ins. Calls whose count cannot be
known for certain are left alone, and a function declared more than once
passes if any declaration fits. cancel eventwhere nothing can be cancelled. In an event Skript's
documentation marks as not cancellable, such ason join:, it is a warning,
with a quick fix that removes the line. Skript refuses to load it.- Local variables that are never set, or never used.
{_x}read in a
trigger that never sets it is a warning, since it is always empty there; one
set but never read is shown faded. Both stay quiet whenever any line could
explain the variable.localVariableDiagnostics: falseturns them off. event-completes the event's own values. Insideon break:, typing
event-offersevent-block,event-playerand the rest of that event's
values first, with theirpastandfutureforms, for core, addon and
custom events.- Format a selection.
editor: format selectionsre-indents just the
selected code, widened to the whole top-level structures it touches so a
structure never ends up half tabs, half spaces. - A blank line between structures. Formatting puts one blank line under a
multi-line structure that runs straight into the next. It never removes one.
formatBlankLines: falseturns it off. - Every feature has a switch. A
featuresblock in the settings turns off
hover, completion, variable completion, signature help, inlay hints,
semantic tokens, colours, links, folding,...
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.0
SkriptZed v0.1.0 Full Skript language support for Zed: a tree-sitter grammar with real indentation handling, and the skript-lsp language server for completion, hover, diagnostics, navigation, quick fixes and semantic highlighting.