language-tools
language-tools copied to clipboard
Vscode does not auto import a component file with the name input.svelte
Describe the bug
A clear and concise description of what the bug is.
When having a file named input.svelte and then typing <Input> into any other component, vscode will not import it in. Vscode can auto import file names like button.svelte. Also by the way, input.svelte works if I manually import it in.
To Reproduce Steps to reproduce the behavior:
- Create a svelte component with the file name of
input.svelte - Type
<Input>and it tab, - It does not autocomplete.
For example a code snippet that is treated in a way you don't expect.
Expected behavior A clear and concise description of what you expected to happen.
<Input></Input>
Screenshots If applicable, add screenshots to help explain your problem.
System (please complete the following information):
- OS: [e.g. Windows] Windows 10
- IDE: [e.g. VSCode, Atom] VSCode
- Plugin/Package: Svelte for VSCode
Another thing to mention, after typing in <Input>, if you try to type in </ it will autocorrect instantly it to </div> instead.
I can't reproduce it. Can you check if it happens in another directory?
I can't reproduce it. Can you check if it happens in another directory?
In some cases it does auto import it but it doesn't auto complete the tag.
Aka the input component is in a folder called components
I'm currently in a different folder right now which it can auto import the script but it doesn't auto complete the tags.
Yes. it won't auto-complete the tag. We're using vscode-html-language-service for tag completion. Since the input tag doesn't have an end tag in HTML, it won't auto close it.
As for the auto import problem can you provide a reproducible? Also, do you have a jsonfig.json or tsconfig.json?
I have a tsconfig.json, and its not actually a default input tag, its a custom component that's called Input.
Yes, I am aware of that and it's an unrelated issue. What I mean by "in HTML" is that vscode-html-language-service treat it as an HTML tag.
Can you check if the svelte files are included in the tsconfig? It would be nice to have a reproducible otherwise I can only guess what could have happened.
Closing due to inactivity.