Releases: webspam/witcherscript-language
Releases · webspam/witcherscript-language
Release list
v0.13.0
Features
- Doc comments are shown in hover tooltips
- Unused parameters, variables, and fields offer a quick fix to "Remove unused var"
- Go-to-definition on a
virtual_parent.member()call now also jumps to every (currently known) subclass override
Bug fixes
- Go-to-definition on the
virtual_parentkeyword now jumps to the state's owner class - Accepting an annotation suggestion like
@wrapMethodno longer doubles the@ - Starting a new annotation with
@before an existing one no longer suggests class names - Picking an annotation snippet now immediately shows a list of class names
What's Changed
- Fix virtual_parent go to definition by @webspam in #293
- List subclass overrides in virtual_parent jumps by @webspam in #294
- Show doc comments in hovers by @webspam in #295
- Add a quick fix to remove unused params, vars, and fields by @webspam in #296
- Bundle wsformat in release zips by @webspam in #297
- tmp: Add once-off workflow to build/release wsformat binary by @webspam in #298
- tmp: Fix wsformat action using incorrect flags by @webspam in #299
- Revert "tmp: Fix wsformat action using incorrect flags" by @webspam in #300
- Revert "tmp: Add once-off workflow to build/release wsformat binary" by @webspam in #301
- Fix annotation autocomplete by @webspam in #302
- Avoid extra work on every keystroke by @webspam in #303
- Version 0.13.0 by @webspam in #304
Full Changelog: v0.12.0...v0.13.0
v0.12.0
Features
wsformatcommand-line formatter: format.wsfiles or whole directories from the terminal, with a--checkmode that lists unformatted files without rewriting them- Formatting now reads a
.wsformat.tomlconfig; thewsformatCLI and your editor both pick up the nearest config in the directory tree and format identically - Many more of the game's built-in enums are now defined, so autocomplete and unknown-symbol warnings recognise them
- Calls with the wrong number of arguments are now flagged: too many arguments, or a missing required (non-
optional) one - Using
parentorvirtual_parentoutside a state is now flagged as an error
Bug fixes
- Go-to-definition and type checking now work on a field accessed through an array element, e.g. the
.fieldinarr[i].field - Cross-file errors now clear once you fix the file they came from, instead of lingering
- The wrong-arguments squiggle now underlines the offending arguments, not the function name
- The formatter no longer drops skipped argument slots (e.g.
f(a, , b)) when wrapping a long call //end-of-line comments no longer add or remove blank lines when formatting- Member completion now works on a line with no trailing
; - Member completion no longer suggests the wrong members when typing before an existing
; - Editing a file rapidly no longer occasionally corrupts highlighting and error positions
Improvements
- A long function call on the right of an assignment now wraps its arguments across lines, matching plain call statements
What's Changed
- Add wsformat command-line formatter by @webspam in #273
- Flag calls with the wrong number of arguments by @webspam in #274
- Fix member access on indexed array elements by @webspam in #275
- Fix stale cross-file diagnostics by @webspam in #276
- Flag parent/virtual_parent used outside a state by @webspam in #278
- Refactor: Remove diagnostics boilerplate by @webspam in #279
- Fix "incorrect params" diagnostic underlining the function name by @webspam in #280
- Fix formatter dropping skipped call arguments when wrapping by @webspam in #281
- Add all unknown enum declarations by @webspam in #282
- Fix EOL comments corrupting blank-line spacing by @webspam in #283
- Fix member completion when a line has no semicolon by @webspam in #285
- Use clippy auto fix by default by @webspam in #286
- Fix data race corrupting syntax tree offsets by @webspam in #288
- Fix incorrect completions show in partial line by @webspam in #289
- Wrap long assignment call arguments across lines by @webspam in #290
- Add a precommit recipe and slim down
just testby @webspam in #291 - Version 0.12.0 by @webspam in #292
Full Changelog: v0.11.0...v0.12.0
wsformat 0.12.0
The wsformat CLI binary for the v0.12.0 release, which was published without it.
v0.11.0
Features
- Reading a struct field straight off a function's return value, e.g.
f().x, is now flagged - store the result in a local variable first
Bug fixes
- Type checking and autocomplete now work when chaining member access through a
privateorprotectedfield onthis - Gitignored and excluded files now stay ignored at startup, even when an editor tab for one is restored before the project finishes loading
- Closing a gitignored or excluded file no longer adds it to the project as a regular script
What's Changed
- Trim and restructure all agent-facing documentation by @webspam in #266
- Fix gitignored files leaking into the workspace index by @webspam in #267
- Flag struct property access on a function's return value by @webspam in #268
- Add WitcherScript language rules doc & disable watchlogs by @webspam in #269
- Add whole-workspace E2E test suite by @webspam in #270
- Fix member access through private fields on this by @webspam in #271
- Version 0.11.0 by @webspam in #272
Full Changelog: v0.10.1...v0.11.0
v0.10.1
Improvements
- Hovering over a
classorstatenow shows its full keyword list, e.g.abstract statemachine class Foo
Bug fixes
- The "override weakens access modifier" diagnostic is no longer inverted
What's Changed
- Fix inverted override access-modifier check by @webspam in #263
- Show full keywords for class and state hovers by @webspam in #264
- Version 0.10.1 by @webspam in #265
Full Changelog: v0.10.0...v0.10.1
v0.10.0
Features
- Extract to variable: pull any expression out into its own
var, ready to rename - Extract to function: turn a selection into a new named function, parameters filled in for you
- Extract to method: lift a selection into a new
privatemethod on the same class - Inline variable: replace a local with its value everywhere and drop the declaration
- Split / join declaration: split
var x : int = 5;into a declaration and an assignment, or join them back - Unused locals, parameters, and private fields are now dimmed in the editor
- If the game directory can't be found, the default script globals (
redscripts.ini) are used - Ten more compiler errors are now caught live in the editor:
- an integer literal too large for an
int - a string literal containing a real newline
- event return type must be missing or
void returnin aneventusing a value that doesn't cast tobool@addMethod/@wrapMethod/@replaceMethodtargeting a state's backing class- a field that shadows one from a parent class
- an override that changes the number of parameters
- an override that weakens the original's access modifier
newor a function call used in a default field value- Modifiers on a
@wrapMethodfunction are now flagged as errors
- an integer literal too large for an
Improvements
- Method and function hover now shows the full signature, not just the name and parameters
parentandvirtual_parentnow appear in state-method autocomplete- The formatter keeps your line breaks in long
+and&&operator chains - Type checking now follows struct arithmetic like
Vector + Vector - The compact-colon setting is now respected in tooltips, completions, and snippets too
Bug fixes
- Errors now clear from open files when you switch git branches
- Hover on
var a, b, c : floatnow shows the right name, not the whole line
What's Changed
- Add extract-to-variable code action by @webspam in #228
- Add nine WitcherScript compiler error diagnostics by @webspam in #229
- Clean up LSP test infrastructure by @webspam in #230
- Extend LSP test infrastructure cleanup by @webspam in #232
- Fix extract-to-var refusing when variable is reassigned later by @webspam in #233
- Improve extract-to-variable selection and safety by @webspam in #234
- Clean up formatter and param rendering code by @webspam in #235
- Fix stale errors on open files after a branch switch by @webspam in #236
- Defer completion docs and add semantic token delta/range by @webspam in #237
- Split query handlers into focused submodules by @webspam in #238
- Show full signature in method and function hover tooltips by @webspam in #240
- Add extract-to-function code action by @webspam in #242
- Split and clean up extract refactor modules by @webspam in #243
- Fix field hover for multi-name declarations by @webspam in #244
- Infer struct type from struct arithmetic by @webspam in #245
- Add "Extract to method" code action by @webspam in #246
- Use default globals when redscripts.ini missing by @webspam in #247
- Respect compact colon setting everywhere by @webspam in #248
- Offer parent and virtual_parent in state method completions by @webspam in #251
- Preserve author line-wrapping in operator chains by @webspam in #252
- Add inline-variable code action by @webspam in #253
- Dim unused locals, parameters, and private fields by @webspam in #254
- Improve the inline variable refactor by @webspam in #255
- Use a single semantic model for code actions by @webspam in #256
- Flag invalid modifiers on @wrapMethod functions by @webspam in #257
- Add join/split declaration code actions by @webspam in #258
- Allow "unsafe" refactoring code actions (with warning) by @webspam in #259
- Fix inline variable wrongly flagged unsafe on method calls by @webspam in #260
- Fix unused-parameter warning on bodyless functions by @webspam in #261
- Version 0.10.0 by @webspam in #262
Full Changelog: v0.9.1...v0.10.0
v0.9.1
Bug fixes
@wrapMethodcompletion now includes methods that are already wrapped elsewhere in the project
What's Changed
Full Changelog: v0.9.0...v0.9.1
v0.9.0
Features
- Workspace symbol search: The editor's workspace symbol list shows all classes, functions, enums, or other symbol across all your
.wsfiles - Document highlight: Selecting a symbol now highlights every use of that symbol in the current file (rather than the default text-match)
- Parameter name inlay hints: Call sites now show the parameter name each argument fills, so you can read which value goes where without opening the signature;
outparameters are marked, and the hint is hidden when the names already match - Collapse/expand
switch: With the cursor on aswitch,case, ordefault, a code action collapses every case onto one line or expands each onto its own - Collapse/expand
if/else: The same code action is now available forif/elsechains - New warning when a
statedeclares an owner class that is not markedstatemachine, with an error when the owner is not a class at all - New error for
private,protected, orpublicmodifiers on struct properties, which WitcherScript does not allow
Bug fixes
- The server no longer deadlocks on startup when you have many editor tabs open
- A
switcharm with a trailing//comment no longer gets split across multiple lines - A blank line is no longer inserted above a comment sitting between two statements
- A comment between
else ifand its condition is no longer pulled inside the parentheses - Consecutive single-line
@addFielddeclarations no longer get a blank line forced between them - Collapsing or expanding a
switchnow copies the case bodies verbatim instead of reformatting them
What's Changed
- Fix formatter splitting adjacent @addField declarations by @webspam in #204
- Flag accessibility modifiers on struct properties by @webspam in #205
- Add parameter name inlay hints at call sites by @webspam in #206
- Follow-up on #206: Simplify setting name by @webspam in #207
- Remove README bloat by @webspam in #208
- Add code action to toggle switch case layout by @webspam in #209
- Add if/else layout code refactoring rewrite by @webspam in #210
- Upgrade Rust edition to 2024 by @webspam in #211
- Enable clippy pedantic and clear the backlog by @webspam in #212
- Store types as structured data instead of strings by @webspam in #213
- Add regression tests for signature help type rendering by @webspam in #214
- Just update justfile by @webspam in #215
- Replace magic strings with constants and unify CST traversal by @webspam in #216
- Bump grammar to v0.16.0 by @webspam in #217
- Fix clippy format_collect & CODESTYLE exception by @webspam in #218
- Fix silent data loss from narrowing integer casts by @webspam in #219
- Add workspace symbol search by @webspam in #220
- Validate state owner declarations by @webspam in #221
- Add document highlight for symbols by @webspam in #222
- Fix formatter bugs with comments by @webspam in #223
- Fix startup deadlock with many open tabs by @webspam in #224
- Version 0.9.0 by @webspam in #225
Full Changelog: v0.8.0...v0.9.0
v0.8.0
Features
- New
witcherscript.baseScriptsDirectorysetting points the editor straight at the game's base scripts folder, for installs where they aren't in the usual place under the game directory. When set, it overrides the path derived fromwitcherscript.gameDirectory
What's Changed
- Add setting to customise base scripts directory by @webspam in #201
- Remove per-setting Mutexes from the LSP backend by @webspam in #202
- Version 0.8.0 by @webspam in #203
Full Changelog: v0.7.3...v0.8.0
v0.7.3
Improvements
- Large projects now open much faster - manual testing showed a 5x improvement when loading base game scripts in a workspace
Bug fixes
- Type checking no longer reports false errors on the
defaultdeclarations ofCBehTreeValengine types - Creating a
CBehTreeValengine value type withnewis now flagged as an error
What's Changed
- Fix release notes stripping backticks in CI by @webspam in #196
- Fix false errors on CBehTreeVal engine value types by @webspam in #197
- Simplify symbol-kind helper functions by @webspam in #198
- Speed up workspace startup and diagnostics by @webspam in #199
- Version 0.7.3 by @webspam in #200
Full Changelog: v0.7.2...v0.7.3