-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coc-vetur doesn't update diagnostics #18
Comments
This is the output of vetur's vetur's debug output[Trace - 12:09:11 AM] Sending request 'initialize - (0)'. Params: { "processId": 15399, "rootPath": "/home/wind/tmp/test-app", "rootUri": "file:///home/wind/tmp/test-app", "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 }, "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 ] } }, "codeAction": { "dynamicRegistration": 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 }, "typeDefinition": { "dynamicRegistration": true }, "implementation": { "dynamicRegistration": true }, "declaration": { "dynamicRegistration": true }, "colorProvider": { "dynamicRegistration": true }, "foldingRange": { "dynamicRegistration": true, "rangeLimit": 5000, "lineFoldingOnly": 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": "INFO" }, "experimental": { "templateInterpolationService": false } }, "emmet": {}, "html": {}, "javascript": { "showUnused": true, "updateImportsOnFileMove": { "enable": true }, "implementationsCodeLens": { "enable": true }, "referencesCodeLens": { "enable": true }, "preferences": { "importModuleSpecifier": "non-relative", "quoteStyle": "single" }, "validate": { "enable": true }, "suggestionActions": { "enabled": true }, "suggest": { "names": true, "enabled": true, "paths": true, "autoImports": true, "completeFunctionCalls": true }, "format": { "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 } }, "typescript": { "showUnused": true, "updateImportsOnFileMove": { "enable": true }, "implementationsCodeLens": { "enable": true }, "referencesCodeLens": { "enable": true }, "preferences": { "importModuleSpecifier": "non-relative", "quoteStyle": "single" }, "suggestionActions": { "enabled": true }, "validate": { "enable": true }, "suggest": { "enabled": true, "paths": true, "autoImports": true, "completeFunctionCalls": true }, "format": { "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 } }, "prettier": { "formatterPriority": 1, "disableLanguages": [ "vue" ], "eslintIntegration": false, "tslintIntegration": false, "stylelintIntegration": false, "requireConfig": false, "onlyUseLocalVersion": false, "disableSuccessMessage": false, "statusItemText": "Prettier", "ignorePath": ".prettierignore", "printWidth": 80, "tabWidth": 2, "singleQuote": false, "trailingComma": "none", "bracketSpacing": true, "jsxBracketSameLine": false, "jsxSingleQuote": false, "htmlWhitespaceSensitivity": "css", "endOfLine": "auto", "parser": "babylon", "semi": true, "useTabs": false, "proseWrap": "preserve", "arrowParens": "avoid" }, "stylusSupremacy": {} }, "globalSnippetDir": "/home/wind/.config/Code/User/snippets/vetur" }, "trace": "verbose", "workspaceFolders": [ { "uri": "file:///home/wind/tmp/test-app", "name": "test-app" } ] }
Essential Links\n
Ecosystem\n
{{testObject.c}} \n \n\n\n<script lang="ts">\nimport Vue from 'vue'\nimport { ITestObject } from './types'\n\nexport default Vue.extend({\n name: 'HelloWorld',\n props: {\n msg: String,\n },\n data (): {\n testObject: ITestObject,\n } {\n return {\n testObject: {\n a: 'a',\n b: 'b',\n c: 'c',\n }\n }\n }\n});\n</script>\n\n\n<style scoped>\nh3 {\n margin: 40px 0 0;\n}\nul {\n list-style-type: none;\n padding: 0;\n}\nli {\n display: inline-block;\n margin: 0 10px;\n}\na {\n color: #42b983;\n}\n</style>\n"} } [Trace - 12:09:12 AM] Received request 'client/registerCapability - (0)'. [Trace - 12:09:12 AM] Sending response 'client/registerCapability - (0)'. Processing request took 0ms [Trace - 12:09:14 AM] Received notification 'textDocument/publishDiagnostics'. All lines just after running command. No new lines if I comment or uncomment line 4 in types.ts I added
into seetings.json of VSCode. trace[Trace - 1:49:53 AM] Sending notification 'workspace/didChangeWatchedFiles'. Params: { "changes": [ { "uri": "file:///home/wind/tmp/test-app/src/components/types.ts", "type": 2 } ] } So, coc-vetur doesn't watch changes in imported *.ts files. coc-vetur's and vscode-vetur's log files differ very much. I can't guess crucial settings that allow vetur to watch *.ts files. |
vetur only works on vue files. |
However, coc-vetur watches imported *.js and *.ts files after reloading when first opening *.vue files. Link to the same issue in original vetur, already closed: vuejs/vetur#626. |
The language client watching js and ts files https://github.com/neoclide/coc-vetur/blob/master/src/index.ts#L63, it's problem of vetur. |
But vetur in VSCode hasn't this problem already and watches updates in associated *.ts and *js files without restarting. |
Could be it's using old vetur, just updated. |
Unfortunately, that didn't solve the problem. Probably, vue-language-server is responsible for that. coc-vetur uses pretty old version 0.0.62, but 0.22.4 is available. Sorry: 0.22.4 is about vetur. |
You should check https://www.npmjs.com/package/vue-language-server |
It turns out |
I am running in the same issue, how did you exactly resolve it |
Thanks for your work!
Coc-vetur doesn't update diagnostics in vue applications with typescript and imported external typescript modules. I have created minimal vue application with
vue create
as an example of this issue: https://github.com/andbar-ru/test-appFile https://github.com/andbar-ru/test-app/blob/master/src/components/HelloWorld.vue has error "[Vetur 2322] [E] Type '{ a: string; b: string; c: string; }' is not assignable to type 'ITestObject'." on the line 50 ("c: 'c',") But if I uncomment line 4 in the file https://github.com/andbar-ru/test-app/blob/master/src/components/types.ts to resolve this error, Vetur doesn't update diagnostic info and continues to show this error. Editing and saving file or reloading it doesn't help. Only reloading extension with the command
:call CocAction('reloadExtension', 'coc-vetur')
makes coc-vetur to update diagnostics. The same happens if then comment line 4 in the file types.ts -- coc-vetur doesn't show error in the file HelloWorld.vue until reloading extension. This issue happens in the last gvim and neovim (appImages)VSCode's vetur updates diagnostics without problems.
Installed coc extensions:
coc-tsserver
coc-vetur
coc-eslint
coc-prettier
coc-json
coc-css
coc-settings.json:
If you need more info, I will provide.
The text was updated successfully, but these errors were encountered: