.release-notes/0.63.2.md
workspace/inlayHint/refresh supportAfter each compilation, pony-lsp now sends a workspace/inlayHint/refresh request to the editor, asking it to re-request inlay hints for all open documents. Previously, inlay hints (such as inferred type annotations) would not update after a file was saved and recompiled. This only takes effect when the editor advertises support for workspace/inlayHint/refresh in its LSP capabilities (all major editors do).
The pony-lsp inlay hint feature now covers additional implicit capability annotations:
let, var, embed), and function return types.fun showing the implicit capability (e.g. box) when no explicit cap keyword is written. Not emitted for be or new.: None val).textDocument/declaration supportThe Pony language server now handles textDocument/declaration requests. In Pony there are no separate declaration sites — declaration and definition are always the same location — so the handler routes directly to the existing go-to-definition implementation. The server advertises declarationProvider: true in its capabilities.
textDocument/rename and textDocument/prepareRename supportThe Pony language server now supports symbol rename. Placing the cursor on any renameable identifier — field, method, behaviour, local variable, parameter, type parameter, class, actor, struct, primitive, trait, or interface — and invoking Rename Symbol in your editor will produce a WorkspaceEdit replacing every occurrence across all packages in the workspace.
textDocument/prepareRename is also implemented, allowing editors to validate that the cursor is on a renameable symbol before prompting for the new name. The server advertises prepareProvider: true in its capabilities.
Renames are rejected with an appropriate error when:
textDocument/typeDefinition supportThe Pony language server now supports Go to Type Definition. Placing the cursor on any symbol with a known type — a local variable, parameter, or field — and invoking Go to Type Definition in your editor will navigate to the declaration of the symbol's type rather than the symbol itself.
This works for explicitly annotated bindings (let x: MyClass) and for bindings whose type is inferred (let x = MyClass.create()).
textDocument/foldingRange supportThe Pony language server now handles textDocument/foldingRange requests, enabling editors to show fold regions for Pony source files.
A fold range is emitted for each top-level type entity (class, actor, struct, primitive, trait, interface) and for each multi-line member (fun, be, new). Within method bodies, fold ranges are also emitted for compound expressions: if (including ifdef, resolved to if by the compiler), while (including for, desugared to while by the compiler), repeat, match, try, and recover blocks. Single-line nodes are excluded since there is nothing to fold.
The server also sends workspace/foldingRange/refresh after each compilation when the editor advertises support for it, so that fold regions update automatically when files change.