sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.74k stars 1.95k forks source link

Document `workbench.editor.labelFormat` setting #8228

Open ethanfox opened 1 year ago

ethanfox commented 1 year ago

Describe the problem

Whenever I'm working on my svelteKit project all of that tabs have "+page.svelte" at the top with their parent folder in smaller letters. e.g.

+page.svelte

/login

Describe the proposed solution

It would be great if there were a way for the parent folder to show up larger and "+page.svelte" to be smaller as it's not that important. e.g.

/login

+page.svelte

The plugin would have to be able to understand how a sveltekit project could be structured.

Importance

nice to have

Additional Information

No response

benmccann commented 1 year ago

you could try setting the short setting for labelFormat: https://stackoverflow.com/questions/54354775/visual-studio-code-how-do-i-display-the-file-directory-in-the-tab-for-all-files#54354948

VS Code does not expose an API to allow to to handle this in the Svelte VS Code plugin: https://github.com/microsoft/vscode/issues/41909

ethanfox commented 1 year ago

you could try setting the short or medium setting for labelFormat: https://stackoverflow.com/questions/54354775/visual-studio-code-how-do-i-display-the-file-directory-in-the-tab-for-all-files#54354948

VS Code does not expose an API to allow to to handle this in the Svelte VS Code plugin

Tragic. Just thought it would be cool to have. Not a big deal.

Conduitry commented 1 year ago

Labeling this as 'documentation' so that we can mention the workbench.editor.labelFormat setting somewhere, possibly in https://kit.svelte.dev/docs/creating-a-project#editor-setup

benmccann commented 8 months ago

There's a new workbench.editor.customLabels.patterns setting that can be used. We should perhaps wait until it hits stable to document it, but I'd love to get feedback on it: https://twitter.com/BenjaminMcCann/status/1770847155739144487

eltigerchino commented 7 months ago

Do we still need to document this if we can include it by default when the Svelte VS Code extension is installed? https://github.com/sveltejs/language-tools/pull/2330