Plugins

需要設定

無需設定

phpcs

phpcs (PHP Code Sniffer): 檢查程式碼標準工具

在windows composer 環境下安裝php_codesniffer

1
2
cd C:\composer
composer require squizlabs/php_codesniffer

Settings加入

1
2
3
"phpcs.enable": true,
"phpcs.standard": null,
"phpcs.executablePath": "C:/composer/vendor/bin/phpcs.bat",

phpcbf

php程式碼format工具
與phpcs搭配,安裝squizlabs/php_codesniffer同時也會安裝phpcbf

Settings加入

1
2
3
"phpcbf.enable": true,
"phpcbf.standard": null,
"phpcbf.executablePath": "C:/composer/vendor/bin/phpcbf.bat",

安裝設定完後,按下右鍵 → Format Document → php程式碼就會自動排版 (超級好用)


laravel-blade

This plugin helps in rendering Blade syntax with highlights and emmet support. In my experience, without the support of this plugin, emmet doesn’t perform well in Blade files as it expands HTML tags without indentations or line breaks.


Laravel goto View

This plugin helps us to quickly jump to view file by pressing Alt+LMB. A tremendously useful plugin for traversing to view files in complex apps.


Laravel goto Controller

Similar to goto View plugin, this plugin helps us traverse to Controllers by pressing Alt+LMB .


Laravel Blade Snippets

This is an extremely useful plugin for Laravel development. You can use emmet-like expansions to Laravel’s Blade tags. For example :

@extends() can be expanded from b:extend . For enabling tab-to-expand feature, please refer the settings file I’ve attached.


PHP Intellisense

These plugins are used for code completion and linting. Very little explanation is required for these plugins as they are pretty standard.

  • Find all symbols : ctrl + P → input @test → you can find test symbols in opening file (function, class, property…)

Reference