Duplicate paths in HTML file
whidy opened this issue · comments
I have searched relative issues, but seems not match this problem, I suddenly find that html
file might show duplicate file path.
When I disable extension, everything to be good. But in my memory, this problem have not happened before. I cannot find any vscode updated changelog may effect this, and not found any settings may disable path auto show to fix it.
Here is image below
Btw, another extention named Path Intellisense
has no problem.
Any idea to solve this problem?
I did some research on this and vscode comes with a built in extension html-language-features
which uses the vscode-html-languageservice
package to provide the path completion in HTML files and HTML attributes (src would be one of them).
https://github.com/microsoft/vscode-html-languageservice/blob/master/src/services/pathCompletion.ts
Unfortunately I don't see any options to disable those path completions.
What you can do to avoid duplicates is use the "path-autocomplete.excludedItems"
option.
// disable all suggestions in HTML files, when the current line contains the href or src attributes
"path-autocomplete.excludedItems": {
"**": {
"when": "**/*.html",
"context": "(src|href)=.*"
}
}
Alternatively you can use path-autocomplete.ignoredFilesPattern
if you want to disable the suggestions in the whole HTML file.
Please try it out and if it works close the issue.
Thanks a lot 👍, I'll try it : )