Eugleo / magic-racket

The best coding experience for Racket in VS Code
https://marketplace.visualstudio.com/items?itemName=evzen-wybitul.magic-racket
GNU General Public License v3.0
202 stars 28 forks source link

Error when starting language server on linux #49

Closed glatavento closed 2 years ago

glatavento commented 3 years ago

图片

Environment

Error message

[Error - 上午11:34:48] Starting client failed
Error: Connection is already listening
    at throwIfListening (/home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-jsonrpc/lib/main.js:682:19)
    at Object.listen (/home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-jsonrpc/lib/main.js:921:13)
    at Object.listen (/home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-languageclient/lib/client.js:39:34)
    at /home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-languageclient/lib/client.js:2051:24
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Additional context

Same error occurs every time when opening a .rkt file, and any feature related to LSP does not work. Other features, such as syntax highlighting and REPL, work well. I have raco and racket in my PATH, and racket -l racket-langserver only shows:

(racket:8704): Gtk-WARNING **: 11:45:28.748: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version

The complete logging message is pasted below:


[Trace - 上午11:58:35] Sending request 'initialize - (0)'.
Params: {
    "processId": 12001,
    "clientInfo": {
        "name": "vscode",
        "version": "1.59.0"
    },
    "rootPath": null,
    "rootUri": null,
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional"
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "didChangeWatchedFiles": {
                "dynamicRegistration": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "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,
                        26
                    ]
                }
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "configuration": true,
            "workspaceFolders": true
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false,
                "tagSupport": {
                    "valueSet": [
                        1,
                        2
                    ]
                }
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true,
                    "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
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    }
                },
                "contextSupport": true
            },
            "definition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "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,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                }
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "implementation": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            },
            "declaration": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            }
        },
        "window": {
            "workDoneProgress": true
        }
    },
    "trace": "verbose",
    "workspaceFolders": null
}

[Trace - 上午11:58:35] Sending request 'shutdown - (1)'.
[Error - 上午11:58:35] Starting client failed
Error: Connection is already listening
    at throwIfListening (/home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-jsonrpc/lib/main.js:682:19)
    at Object.listen (/home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-jsonrpc/lib/main.js:921:13)
    at Object.listen (/home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-languageclient/lib/client.js:39:34)
    at /home/glatavento/.vscode/extensions/evzen-wybitul.magic-racket-0.5.7/node_modules/vscode-languageclient/lib/client.js:2051:24
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

(racket:12122): Gtk-WARNING **: 11:58:36.198: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version

Eugleo commented 2 years ago

This is weird. Have you tried looking at this issue: https://github.com/jeapostrophe/racket-langserver/issues/45 and trying their workaround? Seems to be related, maybe you have an old version of gtk or something.