neoclide / coc-vetur

Vue language server extension for coc.nvim
219 stars 7 forks source link

Latest coc-vetur still not working #44

Closed rainux closed 4 years ago

rainux commented 4 years ago

After install coc-vetur, open a .vue file which containing explicit lint errors with Vim, but no linter message shows up.

Also when Vim opened the .vue file, I can observe high CPU usage of a node process, not sure if there's something crashed and keep restarting. Is there any other way we can diagnose this?

Output of :CocOpenLog:

2020-07-17T16:36:29.686 INFO (pid:65470) [services] - registered service "languageserver.ccls"
2020-07-17T16:36:29.689 INFO (pid:65470) [services] - registered service "languageserver.golang"
2020-07-17T16:36:29.715 INFO (pid:65470) [services] - registered service "eslint"
2020-07-17T16:36:29.715 INFO (pid:65470) [services] - eslint langserver state change: stopped => starting
2020-07-17T16:36:29.778 INFO (pid:65470) [language-client-index] - eslint started with 65520
2020-07-17T16:36:29.888 INFO (pid:65470) [services] - registered service "tsserver"
2020-07-17T16:36:29.909 INFO (pid:65470) [plugin] - coc.nvim 0.0.78-c250e18604 initialized with node: v14.5.0 after 328ms
2020-07-17T16:36:29.919 INFO (pid:65470) [services] - eslint langserver state change: starting => running
2020-07-17T16:36:29.923 INFO (pid:65470) [services] - service eslint started
2020-07-17T16:36:29.975 INFO (pid:65470) [services] - service tsserver started
2020-07-17T16:36:31.812 INFO (pid:65470) [services] - registered service "vetur"
2020-07-17T16:36:31.813 INFO (pid:65470) [services] - Vetur Language Server state change: stopped => starting
2020-07-17T16:36:31.824 INFO (pid:65470) [language-client-index] - vetur started with 65551

Output of :CocCommand workspace.showOutput vetur:

[Trace - 4:39:20 PM] Sending request 'initialize - (0)'.
Params: {
    "processId": 66036,
    "rootPath": "/Users/rainux/devel/kokkoro-notes",
    "rootUri": "file:///Users/rainux/devel/kokkoro-notes",
    "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
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "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
                },
                "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
                    }
                }
            },
            "definition": {
                "dynamicRegistration": 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,
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "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
            },
            "implementation": {
                "dynamicRegistration": true
            },
            "declaration": {
                "dynamicRegistration": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            }
        },
        "window": {
            "workDoneProgress": true
        }
    },
    "initializationOptions": {
        "config": {
            "vetur": {
                "useWorkspaceDependencies": false,
                "completion": {
                    "autoImport": true,
                    "useScaffoldSnippets": true,
                    "tagCasing": "kebab"
                },
                "validation": {
                    "template": true,
                    "style": true,
                    "script": true
                },
                "format": {
                    "enable": true,
                    "options": {
                        "tabSize": 2,
                        "useTabs": false
                    },
                    "defaultFormatter": {
                        "html": "prettyhtml",
                        "css": "prettier",
                        "postcss": "prettier",
                        "scss": "prettier",
                        "less": "prettier",
                        "stylus": "stylus-supremacy",
                        "js": "prettier",
                        "ts": "prettier"
                    },
                    "defaultFormatterOptions": {
                        "js-beautify-html": {
                            "wrap_attributes": "force-expand-multiline"
                        },
                        "prettyhtml": {
                            "printWidth": 100,
                            "singleQuote": false,
                            "wrapAttributes": false,
                            "sortAttributes": false
                        }
                    },
                    "styleInitialIndent": false,
                    "scriptInitialIndent": false
                },
                "trace": {
                    "server": "verbose"
                },
                "dev": {
                    "logLevel": "DEBUG"
                },
                "experimental": {
                    "templateInterpolationService": false
                }
            },
            "emmet": {},
            "html": {},
            "javascript": {
                "showUnused": true,
                "updateImportsOnFileMove": {
                    "enable": true
                },
                "implementationsCodeLens": {
                    "enable": true
                },
                "referencesCodeLens": {
                    "enable": true
                },
                "preferences": {
                    "importModuleSpecifier": "auto",
                    "importModuleSpecifierEnding": "auto",
                    "quoteStyle": "auto"
                },
                "validate": {
                    "enable": true
                },
                "suggestionActions": {
                    "enabled": true
                },
                "suggest": {
                    "names": true,
                    "enabled": true,
                    "paths": true,
                    "autoImports": true,
                    "completeFunctionCalls": true,
                    "includeAutomaticOptionalChainCompletions": true
                },
                "format": {
                    "enabled": true,
                    "insertSpaceAfterCommaDelimiter": true,
                    "insertSpaceAfterConstructor": false,
                    "insertSpaceAfterSemicolonInForStatements": true,
                    "insertSpaceBeforeAndAfterBinaryOperators": true,
                    "insertSpaceAfterKeywordsInControlFlowStatements": true,
                    "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
                    "insertSpaceBeforeFunctionParenthesis": false,
                    "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
                    "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
                    "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
                    "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
                    "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
                    "insertSpaceAfterTypeAssertion": false,
                    "placeOpenBraceOnNewLineForFunctions": false,
                    "placeOpenBraceOnNewLineForControlBlocks": false,
                    "semicolons": "ignore"
                }
            },
            "typescript": {
                "showUnused": true,
                "updateImportsOnFileMove": {
                    "enable": true
                },
                "implementationsCodeLens": {
                    "enable": true
                },
                "referencesCodeLens": {
                    "enable": true
                },
                "preferences": {
                    "importModuleSpecifier": "auto",
                    "importModuleSpecifierEnding": "auto",
                    "quoteStyle": "auto"
                },
                "suggestionActions": {
                    "enabled": true
                },
                "validate": {
                    "enable": true
                },
                "suggest": {
                    "enabled": true,
                    "paths": true,
                    "autoImports": true,
                    "completeFunctionCalls": true,
                    "includeAutomaticOptionalChainCompletions": true
                },
                "format": {
                    "enabled": true,
                    "insertSpaceAfterCommaDelimiter": true,
                    "insertSpaceAfterConstructor": false,
                    "insertSpaceAfterSemicolonInForStatements": true,
                    "insertSpaceBeforeAndAfterBinaryOperators": true,
                    "insertSpaceAfterKeywordsInControlFlowStatements": true,
                    "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
                    "insertSpaceBeforeFunctionParenthesis": false,
                    "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
                    "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
                    "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
                    "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
                    "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
                    "insertSpaceAfterTypeAssertion": false,
                    "placeOpenBraceOnNewLineForFunctions": false,
                    "placeOpenBraceOnNewLineForControlBlocks": false,
                    "semicolons": "ignore"
                },
                "workspaceSymbols": {
                    "scope": "allOpenProjects"
                }
            },
            "prettier": {},
            "stylusSupremacy": {}
        },
        "globalSnippetDir": "/Users/rainux/Library/Application Support/Code/User/snippets/vetur"
    },
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///Users/rainux/devel/kokkoro-notes",
            "name": "kokkoro-notes"
        }
    ],
    "clientInfo": {
        "name": "coc.nvim",
        "version": "0.0.78"
    }
}

[Trace - 4:39:21 PM] Received notification 'window/logMessage'.
Params: {
    "type": 4,
    "message": "Loaded bundled typescript@3.9.7."
}

Loaded bundled typescript@3.9.7.
chemzqm commented 4 years ago

Should be problem of your vetur, can't help.

rainux commented 4 years ago

I don't understand what is "my vetur". I think I only installed coc-vetur through coc.nvim.

Actually I tried completely remove Node.js and it's global packages, remove ~/.config/coc directory, remove coc.nvim plugin, and do a fresh installation of them. But the problem still exists.

chemzqm commented 4 years ago

It only means vetur package on your machine.

rainux commented 4 years ago

I don't have any other vetur package installed, only coc-vetur installed with coc.nvim, from your releases.

And since the problem is reproducible I consider it is an issue of coc-vetur, I don't understand why you just simply close this issue.

chemzqm commented 4 years ago

Can't help, you have to debug it yourself https://github.com/neoclide/coc.nvim/wiki/Debug-coc.nvim