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