I've been trying to hook up `deno lsp` with https://nova.app, but I've hit a pro…blem where the request for `textDocument/completion` result in this error:
```
Unable to get completion info from TypeScript: Error: Debug Failure. Illegal value: "r"
at isValidTrigger (deno:cli/tsc/00_typescript.js:122443:37)
at Object.getCompletionsAtPosition (deno:cli/tsc/00_typescript.js:120179:92)
at Object.getCompletionsAtPosition (deno:cli/tsc/00_typescript.js:149797:35)
at serverRequest (deno:cli/tsc/99_main_compiler.js:632:27)
at [native_code]:1:12
Internal error
```
This is while typing an "r" inside the for loop of the [example/server.ts](https://github.com/robb-j/nova-deno/blob/main/examples/server.ts) and I would expect it to show a completion for at least `req`. So far I've got Nova and Deno talking to each other, Nova is returning configuration for `workspace/configuration` requests and I can see code signature information on hovering.
I can get stdin and stdout logs of the `deno lsp` process, through [creative uses of the tee command](https://github.com/robb-j/nova-deno/blob/main/src/deno-language-server.ts#L92) if that would be any help and I can run it with `internalDebug` and/or `--log-level=debug` too.
<details>
<summary>Versions</summary>
```
deno version: 1.11.0
nova version: 6.2
```
</details>
<details>
<summary>Workspace Configuration</summary>
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"suggest.autoImports": true,
"suggest.names": true,
"internalDebug": false,
"unstable": true,
"lint": true,
"enable": true,
"suggest.imports.autoDiscover": true,
"suggest.completeFunctionCalls": false,
"path": "/usr/local/bin/deno",
"suggest.paths": true
}
]
}
```
</details>
<details>
<summary>Initialize Capabilities</summary>
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "initialize",
"params": {
"capabilities": {
"workspace": {
"configuration": true,
"applyEdit": true,
"executeCommand": {},
"workspaceFolders": true,
"workspaceEdit": {
"failureHandling": "undo",
"documentChanges": true,
"resourceOperations": ["create", "rename", "delete"]
}
},
"textDocument": {
"rename": { "prepareSupport": true },
"codeAction": {
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.inline",
"refactor.extract",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
},
"isPreferredSupport": true
},
"hover": { "contentFormat": ["markdown", "plaintext"] },
"completion": {
"completionItem": {
"snippetSupport": true,
"deprecatedSupport": true,
"commitCharactersSupport": true,
"documentationFormat": ["markdown", "plaintext"],
"tagSupport": { "valueSet": [1] }
},
"completionItemKind": {
"valueSet": [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25
]
},
"contextSupport": true
},
"codeLens": {},
"documentHighlight": {},
"synchronization": {
"didSave": true,
"willSave": true,
"willSaveWaitUntil": true
},
"publishDiagnostics": {
"versionSupport": true,
"relatedInformation": true
},
"declaration": { "linkSupport": true },
"typeDefinition": { "linkSupport": true },
"definition": { "linkSupport": true },
"implementation": { "linkSupport": true },
"signatureHelp": {
"signatureInformation": {
"documentationFormat": ["markdown", "plaintext"]
}
}
}
},
"workspaceFolders": [
{ "uri": "file:///Users/rob/dev/nova/deno/", "name": "deno" }
],
"rootPath": "/Volumes/Macintosh HD/Users/rob/dev/nova/deno",
"processId": 83552,
"initializationOptions": {
"enable": true,
"unstable": true,
"internalDebug": false,
"config": null,
"lint": true,
"importMap": null,
"suggest": {
"paths": true,
"autoImports": true,
"completeFunctionCalls": false,
"names": true,
"imports": { "hosts": {}, "autoDiscover": true }
}
},
"rootUri": "file:///Users/rob/dev/nova/deno/",
"clientInfo": { "name": "Nova", "version": "6.2" }
}
}
```
</details>
<details>
<summary>Completion Messages</summary>
**request**
```json
{
"jsonrpc": "2.0",
"id": 11,
"method": "textDocument/completion",
"params": {
"context": { "triggerCharacter": "r", "triggerKind": 2 },
"textDocument": {
"uri": "file:///Volumes/Macintosh%20HD/Users/rob/dev/nova/deno/examples/server.ts"
},
"position": { "line": 8, "character": 3 }
}
}
```
**result**
```json
{
"jsonrpc": "2.0",
"error": { "code": -32603, "message": "Internal error" },
"id": 11
}
```
</details>