- Ter o composer instalado
Recomendados:
- PHP Intelephense
- phpcs (Ioannis Kappas)
- PHP Debug
- PHP DocBlock
- DotENV
- Bracket Pair Colorizer 2
- Partial Diff
Opcionais:
- Dracula Official
- GitLens
- VsCode Great Icons
Vá para aba Extensions
Pesquise: @builtin php
Desabilite a extensão PHP Language Features
Instalando PHPCS
$ composer global require squizlabs/php_codesniffer
Substitua o código do settings.json
pelo código abaixo, você pode ou não manter suas configurações, e fique a vontade pra editar a sua maneira.
{
"workbench.colorTheme": "SynthWave '84",
"editor.fontFamily": "Fira Code, Monospace",
"window.zoomLevel": 0,
"editor.fontWeight": "400", // Regular
"editor.fontSize": 14,
"editor.insertSpaces": true,
"editor.useTabStops": true,
"editor.tabSize": 4,
// "editor.letterSpacing": 0.5,
"editor.lineHeight": 24,
"editor.cursorBlinking": "smooth",
"editor.fontLigatures": true,
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"search.exclude": {
"**/node_modules": true,
"**/vendor" : true,
"**/.git": true,
},
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"files.associations": {
"*.blade.php": "html",
"*.twig": "html",
"*.php": "php",
"*.vue": "vue",
"*.php-cs": "php",
"*.module": "php",
"htm": "php"
},
"editor.rulers": [
120
],
"php.validate.enable": false,
"php.suggest.basic": false,
"editor.autoIndent": "advanced",
"git.showPushSuccessNotification": true,
// "scm.diffDecorations": "none",
"editor.codeLens": true,
"editor.cursorStyle": "line",
"outline.problems.enabled": true,
"explorer.autoReveal": true,
"editor.gotoLocation.multipleDefinitions": "goto",
"explorer.confirmDragAndDrop": true,
"explorer.openEditors.visible": 10, //
"editor.snippetSuggestions": "bottom",
"editor.emptySelectionClipboard": false,
"workbench.sideBar.location": "left",
"workbench.enableExperiments": false,
"workbench.statusBar.visible": true,
"npm.enableScriptExplorer": false,
"workbench.iconTheme": "vscode-great-icons",
"git.enabled": true,
"intelephense.stubs":[
"apache",
"bcmath",
"bz2",
"calendar",
"com_dotnet",
"Core",
"ctype",
"curl",
"date",
"dba",
"dom",
"enchant",
"exif",
"fileinfo",
"filter",
"fpm",
"ftp",
"gd",
"hash",
"iconv",
"imap",
"interbase",
"intl",
"json",
"ldap",
"libxml",
"mbstring",
"mcrypt",
"meta",
"mssql",
"mysqli",
"oci8",
"odbc",
"openssl",
"pcntl",
"pcre",
"PDO",
"pdo_ibm",
"pdo_mysql",
"pdo_pgsql",
"pdo_sqlite",
"pgsql",
"Phar",
"posix",
"pspell",
"readline",
"recode",
"Reflection",
"regex",
"session",
"shmop",
"SimpleXML",
"snmp",
"soap",
"sockets",
"sodium",
"SPL",
"sqlite3",
"standard",
"superglobals",
"sybase",
"sysvmsg",
"sysvsem",
"sysvshm",
"tidy",
"tokenizer",
"wddx",
"xml",
"xmlreader",
"xmlrpc",
"xmlwriter",
"Zend OPcache",
"zip",
"zlib"
],
"intelephense.telemetry.enabled": false,
"intelephense.format.enable": true,
"intelephense.completion.triggerParameterHints": true,
"intelephense.completion.insertUseDeclaration": true,
"intelephense.completion.fullyQualifyGlobalConstantsAndFunctions": true,
"intelephense.trace.server": "messages",
"phpcs.executablePath": "/home/brunobolting/.config/composer/vendor/bin/phpcs",
"phpcs.enable": true,
"phpcs.autoConfigSearch": true,
"phpcs.standard": "PSR12",
"phpcs.showWarnings": true,
"phpcs.showSources": true,
"phpcs.ignorePatterns": [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/storage/**",
"**/resources/views/**",
"**/database/migrations/**",
"**/tests/**",
"**/storage/framework/views/**",
"**/vendor",
"_ide_helper.php",
"_ide_helper_models"
],
"php-docblocker.returnGap": true,
"php-docblocker.qualifyClassNames": true,
"php-docblocker.author": {"name": "Dev", "email": "dev@dotgroup.com"},
"search.collapseResults": "alwaysCollapse",
"search.showLineNumbers": true,
"[shellscript]": {
"editor.insertSpaces": true,
"editor.useTabStops": true,
"editor.tabSize": 4,
"editor.wordBasedSuggestions": true,
"editor.autoIndent": "advanced",
},
"gitlens.codeLens.enabled": false,
"explorer.compactFolders": false,
"task.autoDetect": "off",
"explorer.confirmDelete": false,
"todo-tree.tree.showScanModeButton": false,
"liveServer.settings.donotShowInfoMsg": true,
"diffEditor.ignoreTrimWhitespace": false,
"workbench.startupEditor": "newUntitledFile"
}