Skip to content

Instantly share code, notes, and snippets.

@adriantorrie
Created September 19, 2025 09:27
Show Gist options
  • Select an option

  • Save adriantorrie/4c2b2b4f33bc357f1b9bea885468caad to your computer and use it in GitHub Desktop.

Select an option

Save adriantorrie/4c2b2b4f33bc357f1b9bea885468caad to your computer and use it in GitHub Desktop.
VSCode settings.json for Astro and oxc
// References
// ----------
// - VSCode - Workspace settings
// - https://code.visualstudio.com/docs/configure/settings#_workspace-settings
//
// TODO
// ----
// - Oxc linter settings for VSCode extension "oxc.oxc-vscode"
// - Prettier formatter settings for VSCode extension "esbenp.prettier-vscode"
// - See `package.json` for demarcation of file types for Oxc and Prettier
{
"[astro]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": ["Commitlint", "Lefthook", "neurafabric"], // Add custom words to the spell checker
"editor.cursorBlinking": "smooth", // Smooth cursor blinking
"editor.cursorStyle": "line", // Line cursor style
"editor.defaultFormatter": "esbenp.prettier-vscode", // Use Prettier for formatting
"editor.detectIndentation": false, // Disable auto-detection of indentation style
"editor.formatOnPaste": true, // Auto-format on paste
"editor.formatOnSave": true, // Automatically format on save
"editor.insertSpaces": true, // Use spaces instead of tabs
"editor.minimap.enabled": false, // Disable the minimap for better focus
"editor.renderLineHighlight": "gutter", // Highlight the current line
"editor.renderWhitespace": "boundary", // Show whitespace characters at the boundaries
"editor.rulers": [80], // Set a ruler at 80 characters for line length
"editor.snippetSuggestions": "top", // Show snippets at the top
"editor.tabSize": 2, // Use 2 spaces for indentation
"editor.wordWrap": "on", // Enable word wrapping
"files.autoSave": "onWindowChange", // Auto-save your files on window change
"files.associations": {
"*.astro": "astro" // Ensure `.astro` files are recognized correctly
},
"files.insertFinalNewline": true, // Ensure a final newline on save
"files.trimTrailingWhitespace": true, // Automatically trim trailing whitespace on save
"git.autorefresh": true, // Auto-refresh Git status
"git.enableSmartCommit": true, // Allow smart commits in Git
"prettier.enable": true, // Ensure Prettier is enabled
"prettier.printWidth": 80, // Set print width for Prettier formatting
"prettier.requireConfig": true, // Only format if Prettier config is present
"prettier.singleQuote": true, // Use single quotes in Prettier formatting
"prettier.trailingComma": "es5" // Use trailing commas where valid in ES5 (objects, arrays, etc.)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment