Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add editor label and formatter configuration defaults #2330

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/svelte-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,16 @@
}
}
},
"configurationDefaults": {
"[svelte]": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure we want this because people can also use the prettier extension, if that ones installed I'd actually prefer that one was used assuming people have both prettier and the plugin installed.
The label thing is a super nice addition.

Copy link
Member Author

@eltigerchino eltigerchino Apr 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, but what's the difference between the two? I've been using the svelte formatter set as the default although I have both installed. Mainly because setting prettier as the default formatter prompts me to change the default when I try to format a svelte file in a project that has no prettier installed or prettier config.

"editor.defaultFormatter": "svelte.svelte-vscode"
},
"workbench.editor.customLabels.patterns": {
"src/routes/+[page|server]*": "/${filename}.${extname}",
"src/routes/*/+[page|server]*": "/${dirname}/${filename}.${extname}",
"src/routes/*/*/**/+[page|server]*": ".../${dirname}/${filename}.${extname}",
}
},
"languages": [
{
"id": "svelte",
Expand Down
Loading