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

Visual studio code configuration #341

Open
manuel3108 opened this issue May 5, 2024 · 1 comment
Open

Visual studio code configuration #341

manuel3108 opened this issue May 5, 2024 · 1 comment

Comments

@manuel3108
Copy link
Member

manuel3108 commented May 5, 2024

I think it would be great if there would be a composer for adding Svelte
-specific Visual Studio code configuration, so it is less of a hassle.

.vscode/launch.json

{
        "version": "0.2.0",
        "configurations": [
                {
                        "name": "Launch server",
                        "request": "launch",
                        "runtimeArgs": ["run-script", "dev"],
                        "runtimeExecutable": "pnpm",
                        "skipFiles": ["<node_internals>/**"],
                        "type": "node",
                        "console": "integratedTerminal"
                },

                {
                        "type": "firefox",
                        "request": "launch",
                        "name": "Launch Firefox",
                        "reAttach": true,
                        "url": "http://127.0.0.1:5173",
                        "webRoot": "${workspaceFolder}"
                }
        ],
        "compounds": [
                {
                        "name": "Both",
                        "configurations": ["Launch server", "Launch Firefox"]
                }
        ]
}

.vscode/extensions.json

Note: This is a matter of personal taste and some of these could also be part of the other composers for Tailwind or Github Actions.

{
        "recommendations": [
// Tailwind support
                "bradlc.vscode-tailwindcss",
               // helps creating 🎸 commit messages in Conventional Commits format 
"vivaxy.vscode-conventional-commits",
               // Run Firefox with debugger attached "firefox-devtools.vscode-firefox-debug",
// Github actions Integration 
                "github.vscode-github-actions",
                "svelte.svelte-vscode",
// Load .nvmrc and setup nvm for launch configurations and terminals
                "henrynguyen5-vsc.vsc-nvm",
// most opionated
                // "k--kato.intellij-idea-keybindings",
                "1yib.svelte-bundle",
// Show documentation for Tailwind classes in-editor
                "austenc.tailwind-docs"
        ]
}

Also look for extensions with MDSveX support.

.vscode/settings.json

Set package manager

{
        "npm.packageManager": "pnpm"
}
@manuel3108
Copy link
Member Author

Initially brought up by @tburny in svelte-compose/svelte-compose#23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant