Server is crashing while trying to select trivial code with Cmd+Shift+Up in a saved file.
Part::pspec1: Part specification Key[CodeParser`Source] is not applicable.
Part::partd: Part specification (-1 + {CodeParser`CallNode[{CodeParser`LeafNode[Symbol, f, <|CodeParser`Source -> {{1, 1}, {1, 2}}|>]}, CodeParser`GroupNode[CodeParser`GroupSquare, {CodeParser`LeafNode[Token`OpenSquare, [, <|CodeParser`Source -> {{1, 2}, {1, 3}}|>], CodeParser`CompoundNode[CodeParser`PatternBlank, {CodeParser`LeafNode[Symbol, x, <|CodeParser`Source -> {{1, 3}, {1, 4}}|>], CodeParser`LeafNode[Token`Under, _, <|CodeParser`Source -> {{1, 4}, {1, 5}}|>]}, <|CodeParser`Source -> {{1, 3}, {1, 5}}|>], CodeParser`LeafNode[Token`CloseSquare, ], <|CodeParser`Source -> {{1, 5}, {1, 6}}|>]}, <|CodeParser`Source -> {{1, 2}, {1, 6}}|>], <|CodeParser`Source -> {{1, 1}, {1, 6}}|>], CodeParser`LeafNode[Whitespace, , <|CodeParser`Source -> {{1, 6}, {1, 7}}|>], CodeParser`LeafNode[Token`ColonEqual, :=, <|CodeParser`Source -> {{1, 7}, {1, 9}}|>], CodeParser`LeafNode[Whitespace, , <|CodeParser`Source -> {{1, 9}, {1, 10}}|>], CodeParser`LeafNode[Symbol, x, <|CodeParser`Source -> {{1, 10}, {1, 11}}|>]}[[3,Key[CodeParser`Source]]])[[1,1]] is longer than depth of object.
Part::partd: Part specification (-1 + {CodeParser`CallNode[{CodeParser`LeafNode[Symbol, f, <|CodeParser`Source -> {{1, 1}, {1, 2}}|>]}, CodeParser`GroupNode[CodeParser`GroupSquare, {CodeParser`LeafNode[Token`OpenSquare, [, <|CodeParser`Source -> {{1, 2}, {1, 3}}|>], CodeParser`CompoundNode[CodeParser`PatternBlank, {CodeParser`LeafNode[Symbol, x, <|CodeParser`Source -> {{1, 3}, {1, 4}}|>], CodeParser`LeafNode[Token`Under, _, <|CodeParser`Source -> {{1, 4}, {1, 5}}|>]}, <|CodeParser`Source -> {{1, 3}, {1, 5}}|>], CodeParser`LeafNode[Token`CloseSquare, ], <|CodeParser`Source -> {{1, 5}, {1, 6}}|>]}, <|CodeParser`Source -> {{1, 2}, {1, 6}}|>], <|CodeParser`Source -> {{1, 1}, {1, 6}}|>], CodeParser`LeafNode[Whitespace, , <|CodeParser`Source -> {{1, 6}, {1, 7}}|>], CodeParser`LeafNode[Token`ColonEqual, :=, <|CodeParser`Source -> {{1, 7}, {1, 9}}|>], CodeParser`LeafNode[Whitespace, , <|CodeParser`Source -> {{1, 9}, {1, 10}}|>], CodeParser`LeafNode[Symbol, x, <|CodeParser`Source -> {{1, 10}, {1, 11}}|>]}[[3,Key[CodeParser`Source]]])[[1,2]] is longer than depth of object.
Developer`WriteRawJSONString::jsonstrictencoding: Expression Part cannot be exported as JSON.
14:40:22.045
14:40:22.046 Could not convert to JSON: <|jsonrpc -> 2.0, id -> 8, result -> {<|range -> <|start -> <|line -> 0, character -> 2|>, end -> <|line -> 0, character -> 3|>|>, parent -> <|range -> <|start -> <|line -> 0, character -> 2|>, end -> <|line -> 0, character -> 4|>|>, parent -> <|range -> <|start -> <|line -> 0, character -> 1|>, end -> <|line -> 0, character -> 5|>|>, parent -> <|range -> <|start -> <|line -> (-1 + {CallNode[{LeafNode[Symbol, f, <|Source -> {{1, 1}, {1, 2}}|>]}, GroupNode[GroupSquare, {LeafNode[Token`OpenSquare, [, <|Source -> {{1, 2}, {1, 3}}|>], CompoundNode[PatternBlank, {LeafNode[Symbol, x, <|Source -> {{1, 3}, {1, 4}}|>], LeafNode[Token`Under, _, <|Source -> {{1, 4}, {1, 5}}|>]}, <|Source -> {{1, 3}, {1, 5}}|>], LeafNode[Token`CloseSquare, ], <|Source -> {{1, 5}, {1, 6}}|>]}, <|Source -> {{1, 2}, {1, 6}}|>], <|Source -> {{1, 1}, {1, 6}}|>], LeafNode[Whitespace, , <|Source -> {{1, 6}, {1, 7}}|>], LeafNode[Token`ColonEqual, :=, <|Source -> {{1, 7}, {1, 9}}|>], LeafNode[Whitespace, , <|Source -> {{1, 9}, {1, 10}}|>], LeafNode[Symbol, x, <|Source -> {{1, 10}, {1, 11}}|>]}[[3,Key[Source]]])[[1,1]], character -> (-1 + {CallNode[{LeafNode[Symbol, f, <|Source -> {{1, 1}, {1, 2}}|>]}, GroupNode[GroupSquare, {LeafNode[Token`OpenSquare, [, <|Source -> {{1, 2}, {1, 3}}|>], CompoundNode[PatternBlank, {LeafNode[Symbol, x, <|Source -> {{1, 3}, {1, 4}}|>], LeafNode[Token`Under, _, <|Source -> {{1, 4}, {1, 5}}|>]}, <|Source -> {{1, 3}, {1, 5}}|>], LeafNode[Token`CloseSquare, ], <|Source -> {{1, 5}, {1, 6}}|>]}, <|Source -> {{1, 2}, {1, 6}}|>], <|Source -> {{1, 1}, {1, 6}}|>], LeafNode[Whitespace, , <|Source -> {{1, 6}, {1, 7}}|>], LeafNode[Token`ColonEqual, :=, <|Source -> {{1, 7}, {1, 9}}|>], LeafNode[Whitespace, , <|Source -> {{1, 9}, {1, 10}}|>], LeafNode[Symbol, x, <|Source -> {{1, 10}, {1, 11}}|>]}[[3,Key[Source]]])[[1,2]]|>, end -> <|line -> {CallNode[{LeafNode[Symbol, f, <|Source -> {{1, 1}, {1, 2}}|>]}, GroupNode[GroupSquare, {LeafNode[Token`OpenSquare, [, <|Source -> {{1, 2}, {1, 3}}|>], CompoundNode[PatternBlank, {LeafNode[Symbol, x, <|Source -> {{1, 3}, {1, 4}}|>], LeafNode[Token`Under, _, <|Source -> {{1, 4}, {1, 5}}|>]}, <|Source -> {{1, 3}, {1, 5}}|>], LeafNode[Token`CloseSquare, ], <|Source -> {{1, 5}, {1, 6}}|>]}, <|Source -> {{1, 2}, {1, 6}}|>], <|Source -> {{1, 1}, {1, 6}}|>], LeafNode[Whitespace, , <|Source -> {{1, 6}, {1, 7}}|>], LeafNode[Token`ColonEqual, :=, <|Source -> {{1, 7}, {1, 9}}|>], LeafNode[Whitespace, , <|Source -> {{1, 9}, {1, 10}}|>], LeafNode[Symbol, x, <|Source -> {{1, 10}, {1, 11}}|>]}, character -> 3|>|>|>|>|>|>}|>
14:40:22.047
14:40:22.047 Language Server kernel did not shutdown properly.
14:40:22.047
14:40:22.047 This is the command that was used:
14:40:22.047 {/Applications/Mathematica.app/Contents/MacOS/WolframKernel, -noinit, -noprompt, -nopaclet, -noicon, -nostartuppaclets, -run, Needs["LSPServer`"];LSPServer`StartServer[]}
14:40:22.048
14:40:22.048 To help diagnose the problem, run this in a notebook:
Needs["LSPServer`"]
LSPServer`RunServerDiagnostic[{"/Applications/Mathematica.app/Contents/MacOS/WolframKernel", "-noinit", "-noprompt", "-nopaclet", "-noicon", "-nostartuppaclets", "-run", "Needs[\"LSPServer`\"];LSPServer`StartServer[]"}]
14:40:22.048
14:40:22.048 Fix any problems then restart and try again.
14:40:22.048
14:40:22.048 KERNEL IS EXITING HARD
14:40:22.048
[Info - 2:40:23 PM] Connection to server got closed. Server will restart.
[Error - 2:40:23 PM] Request textDocument/selectionRange failed.
Error: Connection got disposed.
at Object.connectionOptions [as dispose] (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/connection.js:1045:52)
at Object._clientOptions [as dispose] (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-languageclient/lib/common/client.js:2414:123)
at w.fillInitializeParams (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-languageclient/lib/common/client.js:2432:27)
at w.this [as handleConnectionClosed] (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-languageclient/lib/node/main.js:158:15)
at isEmpty (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-languageclient/lib/common/client.js:2413:45)
at i._callbacks [as invoke] (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/events.js:64:5)
at o.timer [as fire] (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/events.js:122:18)
at isEmpty (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/connection.js:274:33)
at i._callbacks [as invoke] (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/events.js:64:5)
at o.partialMessageEmitter [as fire] (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/events.js:122:18)
at m.fireClose (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js:43:21)
at Socket.<anonymous> (/Users/swish/.vscode/extensions/wolframresearch.wolfram-1.7.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js:131:45)
at Socket.emit (node:events:538:35)
at Pipe.<anonymous> (node:net:687:12)
14:40:25.098 $CommandLine: {/Applications/Mathematica.app/Contents/MacOS/WolframKernel, -noinit, -noprompt, -nopaclet, -noicon, -nostartuppaclets, -run, Needs["LSPServer`"];LSPServer`StartServer[]}
14:40:25.100
14:40:25.100 $commProcess: StdIO
14:40:25.100
14:40:25.100 $ProcessID: 90329
14:40:25.101
14:40:25.101 $ParentProcessID: 90158
14:40:25.101
14:40:25.101 Directory[]: /private/var/folders/ll/y9p6f70j7bxddkx_3l8rr8fh0000gn/T/Wolfram-LSPServer
14:40:25.101
14:40:25.101 Starting server... (If this is the last line you see, then StartServer[] may have been called in an unexpected way and the server is hanging.)
14:40:25.101