Repository navigation
v0.2.5
·
6 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Protocol conformance and correctness release. Most servers only need the mechanical migration below.
Breaking changes
Hover.Contentsis now a union type — replacelsp.MarkupContent{...}literals withlsp.NewHoverContents(kind, value).CompletionItem.TextEditis now*lsp.CompletionTextEdit— wrap edits withlsp.NewCompletionTextEdit(...)orlsp.NewCompletionInsertReplaceEdit(...).WorkspaceEdit.DocumentChangesis now[]lsp.DocumentChangeand supports create/rename/delete file operations — use thelsp.New*Changeconstructors.DocumentSymbolProvider/WorkspaceSymbolProviderare option structs instead of*bool; check them with.Enabled().- The LSP lifecycle is enforced: requests before
initializeget-32002, requests aftershutdownare rejected, and notifications outside the initialized window are dropped (custom methods registered withHandleMethodincluded). server.Runnow returnsnilafter a clean shutdown/exit handshake andserver.ErrExitWithoutShutdownwhen exit arrives without shutdown.
Fixed
- The
exitnotification actually terminates the server, including over stdio. - Notification handlers can call the client (
Configuration,ApplyEdit, ...) without deadlocking the connection. - Malformed input no longer kills the connection: bad JSON, invalid messages, and non-string/int request ids get
-32700/-32600replies and the server keeps serving; hostileContent-Lengthvalues are rejected safely. - UTF-16 position handling clamps per spec and can no longer split a
\r\npair when applying edits. $/cancelRequestreaches requests that are still queued, and cancelled requests always receive a response.- Concurrent
initializerequests can no longer both run; zero-value union structs marshal to their legacy shapes instead of erroring. - The debug UI binds loopback by default and rejects non-loopback websocket origins.
Added
- LSP 3.17: notebook document sync,
workspaceSymbol/resolve, completionitemDefaults/labelDetails, code actiontriggerKind,window/workDoneProgress/cancel, andworkspace/did{Create,Rename,Delete}Files. LocationLinkhandler variants for the definition family, automaticworkspace.workspaceFoldersadvertisement, andWithOnTypeFormattingOptions/WithNotebookSyncOptions.
Full Changelog: v0.2.4...v0.2.5