VS Code is a powerful and versatile code editor that can be customized to enhance your development experience as a Laravel developer. Here are my favorite settings:
Open the settings.json file in VS Code by pressing Ctrl + , or Cmd + ,.
Font is important for me for readability and consistency. I recommend using a monospaced font like "Fira Code", "JetBrains Mono", and "Monaspace" for Laravel development.
"editor.fontFamily": "JetBrains Mono",
"editor.fontLigatures": "'calt', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'liga'"Enabled Ligatures: Ligature is a character consisting of two or more joined symbols
The line height setting controls the space between lines in the editor. Increasing the line height can help you read code more easily and focus on the content.
"editor.lineHeight": 2The minimap setting displays a preview of the code in the editor mostly in right side. It can be useful for quickly scanning large files and finding specific code. If the codebase is large, it can be take space so setting auto hide do the task.
"editor.minimap.enabled": true,
"editor.minimap.autohide": true,The files setting controls how files are opened in the editor.
"files.eol": "\n",
"files.trimTrailingWhitespace": true, // Trim trailing whitespace on save
"files.insertFinalNewline": true, // Insert final newline on save
"files.trimFinalNewlines": true, // Trim final newlines on saveThe formatting setting controls how code is formatted in the editor.
"prettier.endOfLine": "lf", // Use LF line endings, Options: 'lf', 'crlf', 'cr', 'auto'
"editor.formatOnSave": true, // Format on save
"emmet.triggerExpansionOnTab": true, // Trigger Emmet expansion on tab
"php.suggest.basic": false, // Disable basic suggestions as other extensions provide better suggestions
"editor.autoIndent": "full", // Auto indent options: none, keep, brackets, advanced, full
"explorer.openEditors.visible": 0, // Hide open editors
"editor.tabCompletion": true, // Enable tab completion