Closed phobetron closed 2 years ago
@phobetron It is a diagnostic message at the "hint level" ([Vetur] [H] ...
). It is not an Error message.
The same will be displayed in VSCode's vetur
.
This is a feature added in this release of vetur
v0.32.0 and vls
v0.7.0. https://github.com/vuejs/vetur/releases/tag/v0.32.0
Show deprecated hint in script block.
If you want to hide this message, set diagnostic.showDeprecated
or diagnostic.showUnused
to false
in coc-settings.json
.
{
// ...snip
"diagnostic.showDeprecated": false,
"diagnostic.showUnused": false,
// ...snip
}
Alternatively, it can be suppressed by setting diagnostic.level
(default: "hint"
) to a value higher than infomation
.
{
// ...snip
"diagnostic.level": "information",
// ...snip
}
@yaegassy Do you know why those messages are displayed, even for props and computed properties that are verifiably referenced within the template? They are not deprecated, and the hints do not disappear when deprecation diagnostics are disabled.
I would like to see hints for unused variables, but these are not unused.
@phobetron If the problem is also reproduced in VSCode, it would be better to ask the question in vetur's itself issue.
I use coc-vetur
because I do not use VSCode, so I can not verify in VSCode. In the screen-shot you had posted, it is unclear whether the variable in question is actually referenced.
I'd be shocked if I'm the only one with this issue, unless I'm the only person who uses Vue, TS, vue-property-decorator
, and NeoVim together.
I'd be shocked if I'm the only one with this issue, unless I'm the only person who uses Vue, TS, vue-property-decorator, and NeoVim together.
Most vue users use VSCode without TS I think.
You can check the output https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel
@phobetron I have also tried other LSP client plugins.
The situation is the same for "vim-lsp" and "Neovim built-in lsp" with the latest version of vls
.
You may find something related to the "vetur" issue. For example, this issue. https://github.com/vuejs/vetur/issues/2646
Since you seem to think it is a big issue, I still think you should ask the question in the vetur's issue.
False positives triggered by default are a pretty big issue, especially if the solution to remove them may also remove meaningful messages. I'll ask the vetur
maintainers.
After upgrading to the latest release of
coc-vetur
, I've started receiving errors such as:This error is displayed for props, computed properties, and watcher methods, while using
vue-property-decorator
in a SFC.This issue can be mitigated by downgrading
coc-vetur
to version1.2.3
.Edit: I am also using a local
eslint
configuration for my project, which works as expected on1.2.3
.