vim-lsp icon indicating copy to clipboard operation
vim-lsp copied to clipboard

`initialize` rcp method fails for metals v0.11.7

Open lucianojoublanc-da opened this issue 2 years ago • 0 comments

I recently re-installed metals via the vim-lsp-settings plugin, and looks like it's now pulling down v0.11.7 released a week ago.

The initialization step fails with:

{
    "response": {
        "id": 1,
        "jsonrpc": "2.0",
        "error": {
            "data": {
                "message": "java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 1186 path $.params.capabilities.textDocument.typeHierarchy"
            },
            "code": -32700,
            "message": "Message could not be parsed."
        }
    },
    "request": {
        "id": 1,
        "jsonrpc": "2.0",
        "method": "initialize",
        "params": {
            "rootUri": "file:///home/luciano/src",
            "initializationOptions": {
                "isHttpEnabled": "true"
            },
            "capabilities": {
                "workspace": {
                    "configuration": true,
                    "applyEdit": true
                },
                "window": {
                    "workDoneProgress": false
                },
                "textDocument": {
                    "semanticHighlightingCapabilities": {
                        "semanticHighlighting": false
                    },
                    "codeAction": {
                        "codeActionLiteralSupport": {
                            "codeActionKind": {
                                "valueSet": [
                                    "",
                                    "quickfix",
                                    "refactor",
                                    "refactor.extract",
                                    "refactor.inline",
                                    "refactor.rewrite",
                                    "source",
                                    "source.organizeImports"
                                ]
                            }
                        },
                        "dynamicRegistration": false
                    },
                    "completion": {
                        "completionItem": {
                            "snippetSupport": false,
                            "resolveSupport": {
                                "properties": [
                                    "additionalTextEdits"
                                ]
                            },
                            "documentationFormat": [
                                "plaintext"
                            ]
                        },
                        "dynamicRegistration": false,
                        "completionItemKind": {
                            "valueSet": [
                                10,
                                11,
                                12,
                                13,
                                14,
                                15,
                                16,
                                17,
                                18,
                                19,
                                20,
                                21,
                                22,
                                23,
                                24,
                                25,
                                1,
                                2,
                                3,
                                4,
                                5,
                                6,
                                7,
                                8,
                                9
                            ]
                        }
                    },
                    "formatting": {
                        "dynamicRegistration": false
                    },
                    "codeLens": {
                        "dynamicRegistration": false
                    },
                    "hover": {
                        "dynamicRegistration": false,
                        "contentFormat": [
                            "markdown",
                            "plaintext"
                        ]
                    },
                    "rangeFormatting": {
                        "dynamicRegistration": false
                    },
                    "declaration": {
                        "dynamicRegistration": false,
                        "linkSupport": true
                    },
                    "references": {
                        "dynamicRegistration": false
                    },
                    "typeHierarchy": false,
                    "foldingRange": {
                        "rangeLimit": 5000,
                        "dynamicRegistration": false,
                        "lineFoldingOnly": true
                    },
                    "documentSymbol": {
                        "symbolKind": {
                            "valueSet": [
                                10,
                                11,
                                12,
                                13,
                                14,
                                15,
                                16,
                                17,
                                18,
                                19,
                                20,
                                21,
                                22,
                                23,
                                24,
                                25,
                                26,
                                1,
                                2,
                                3,
                                4,
                                5,
                                6,
                                7,
                                8,
                                9
                            ]
                        },
                        "dynamicRegistration": false,
                        "labelSupport": false,
                        "hierarchicalDocumentSymbolSupport": false
                    },
                    "synchronization": {
                        "dynamicRegistration": false,
                        "willSaveWaitUntil": false,
                        "willSave": false,
                        "didSave": true
                    },
                    "documentHighlight": {
                        "dynamicRegistration": false
                    },
                    "implementation": {
                        "dynamicRegistration": false,
                        "linkSupport": true
                    },
                    "typeDefinition": {
                        "dynamicRegistration": false,
                        "linkSupport": true
                    },
                    "definition": {
                        "dynamicRegistration": false,
                        "linkSupport": true
                    }
                }
            },
            "rootPath": "/home/luciano/src",
            "clientInfo": {
                "name": "vim-lsp"
            },
            "processId": 34885,
            "trace": "off"
        }
    }
}

Expect something has changed in the metals side? Or it could possibly be a misconfiguration by sbt-metals-settings; I'm not sure how to check this though.

lucianojoublanc-da avatar Jul 11 '22 08:07 lucianojoublanc-da