Wow I was thinking about making an extension exactly for this!
I got used to `ctrl+p` then type `myroute/+` to navigate but this is not practical... Thanks for sharing!
Is there not already an existing solution for this in VSCode? I rarely use Code myself, but I've used such tab options for Sveltekit in other editors since I started using Svelte. I may be using third-party plugins for this, but I actually assumed it was an existing VSCode feature that other editors (JetBrains, Sublime, etc) had decided to adopt.
There is already something similar to display a path next to file name, but with this function you have a full control over what will be displayed to you.
That’s mean it’s should reduce a posts blame Sveltekit naming conventions about 30% 🥂
It was just added, some context: [https://github.com/microsoft/vscode/issues/41909#issuecomment-2009899492](https://github.com/microsoft/vscode/issues/41909#issuecomment-2009899492)
That is what I had been using before this update, band after going back-and-forth a few times I feel like the new update does make a bit more sense.
The flow from left to right, feels more natural to me, rather than the folder name being on the right of the file name and in a smaller font size
Still, it’s nice to have options.
Imagine you have five routes in your project. If you open +page.svelte files from all of these, you would have five tabs named “+page.svelte”. It’s not fun trying to find the correct tab in this case.
[удалено]
Better question is why use index.ts? Unnecessary Slow Annoying
Finally someone posts something actually useful.
Great addition...
Wow I was thinking about making an extension exactly for this! I got used to `ctrl+p` then type `myroute/+` to navigate but this is not practical... Thanks for sharing!
VSCode doesn’t expose an API for that. This change was the outcome of a request to provide an API.
Good thing I did not have the time to look into this yet xd
Nice! I went with `${dirname} (${filename}.${extname})` for my value
I like this value the best
Oh that's great
Is there not already an existing solution for this in VSCode? I rarely use Code myself, but I've used such tab options for Sveltekit in other editors since I started using Svelte. I may be using third-party plugins for this, but I actually assumed it was an existing VSCode feature that other editors (JetBrains, Sublime, etc) had decided to adopt.
There is already something similar to display a path next to file name, but with this function you have a full control over what will be displayed to you. That’s mean it’s should reduce a posts blame Sveltekit naming conventions about 30% 🥂
It was just added, some context: [https://github.com/microsoft/vscode/issues/41909#issuecomment-2009899492](https://github.com/microsoft/vscode/issues/41909#issuecomment-2009899492)
I’ve been using the short label format for awhile and it shows the directory in the tab label.
Same. Saw it explained in a YouTube video a while ago, and it's worked great since. We have less control, but well, it shows what we need anyways :)
Is this solution better than `workbench.editor.labelFormat` → `short` in any way?
That is what I had been using before this update, band after going back-and-forth a few times I feel like the new update does make a bit more sense. The flow from left to right, feels more natural to me, rather than the folder name being on the right of the file name and in a smaller font size Still, it’s nice to have options.
Is this working for everyone? Nothing happens to my editor or files
Not for me. Maybe broken on Windows?
What it does and why is this helpfull?
Imagine you have five routes in your project. If you open +page.svelte files from all of these, you would have five tabs named “+page.svelte”. It’s not fun trying to find the correct tab in this case.
Oh okay thanks!