porifa / vscode-laraphense

[VSCode Extension] Laraphense Extension for vs code
https://marketplace.visualstudio.com/items?itemName=Porifa.laraphense
MIT License
13 stars 3 forks source link

Laraphense

Laraphense is code intelligence for productive Laravel development.

Features

Requirements

You Must have a workspace open having Laravel Installed.

Show Suggestions based on the Laravel version

Auto-Completion

Files Creation

Go To View

Env File Syntax Highlighting

Curly Braces/brackets Spacer

Extension Settings

These are the setting you can use.

Customize the Maximum number of scanning rows

"Laraphense.maxLinesCount": 1000

default is 1000.

Add Custom Validation Rules as an object

"Laraphense.customValidationRules": {}

for validation rule auto-completion.

Add Models path as an array

"Laraphense.modelsPaths": ["app", "app/Models" ]

these 2 paths are included by default

Customize view file extensions

"Laraphense.viewExtensions": [".blade.php", ".vue" ]

these 2 extensions are included by default

Customize view folders paths

"Laraphense.viewFolders": {
                            "default": "/resources/views",
                            "js": "/resources/js/Pages",
                            "livewire": "/resources/views/livewire",
                            "vendor": "/resources/views/vendor"
                        }

these 3 extensions are included by default,

Add View Directory Separator

"Laraphense.viewDirectorySeparator": "."

default is ".", you can use "/".

Enable/Disable creating a view file from any valid string

"Laraphense.createViewEveryWhere": true

to enable or disable creating a view file from EveryWhere.

Enable/Disable Go To View

"Laraphense.disableGoToView": false

If you want to disable the go-to view feature, set this to true.

Enable/Disable Go To Config

"Laraphense.disableGoToConfig": false

If you want to disable the go-to config feature, set this to true.

Enable/Disable Assets Auto-Completion

"Laraphense.disableAssetCompletion": false

If you want to disable assets autocomplete set this to true.

Enable/Disable Auth Auto-Completion

"Laraphense.disableAuthCompletion": false

If you want to disable auth autocomplete set this to true.

Enable/Disable Blade Auto-Completion

"Laraphense.disableBladeCompletion": false

If you want to disable blade directives autocomplete set this to true.

Enable/Disable Controller Auto-Completion

"Laraphense.disableControllerCompletion": false

If you want to disable Controller autocomplete set this to true.

Enable/Disable Config Auto-Completion

"Laraphense.disableConfigCompletion": false

If you want to disable config autocomplete set this to true.

Enable/Disable Curly Braces Spacer

"Laraphense.disableCurlyBracesSpacer": false

to enable or disable Curly Braces Spacer. By default, it is enabled

Enable/Disable Eloquent Auto-Completion

"Laraphense.disableEloquentCompletion": false

If you want to disable Eloquent autocomplete set this to true.

Enable/Disable Env Auto-Completion

"Laraphense.disableEnvCompletion": false

If you want to disable Env autocomplete set this to true.

Enable/Disable Middleware Auto-Completion

"Laraphense.disableMiddlewareCompletion": false

If you want to disable Middleware autocomplete set this to true.

Enable/Disable Mix Auto-Completion

"Laraphense.disableMixCompletion": false

If you want to disable Mix autocomplete set this to true.

Enable/Disable Route Auto-Completion

"Laraphense.disableRouteCompletion": false

If you want to disable Route autocomplete set this to true.

Enable/Disable Translation Auto-Completion

"Laraphense.disableTranslationCompletion": false

If you want to disable Translation autocomplete set this to true.

Enable/Disable Validation Auto-Completion

"Laraphense.disableValidationCompletion": false

If you want to disable Validation autocomplete set this to true.

Enable/Disable View Auto-Completion

"Laraphense.disableViewCompletion": false

If you want to disable View autocomplete set this to true.

Advance Configurations

Configure Regex for Matching view files

"Laraphense.viewRegex": "(?<=view\\(['\"]|.view:.?['\"]|View::make\\(['\"]|nest\\(['\"](.*)['\"],.?['\"]|@include\\(['\"]|@extends\\(['\"]|@component\\(['\"]|@livewire\\(['\"]|Inertia::render\\(['\"]|\\(component:.['\"]|\\<)(\\<x-|\\<livewire:|[^'\" \\>]+)"

this regex is used to match the view files for quick jumping.

Configure Regex for Creating view files

"Laraphense.viewCreateRegex": "(?<=View::make\\(['\"]|view\\(['\"]|.view:.['\"]|Inertia::render\\(['\"]|\\(component:.['\"])([^'\"]+)"

this regex is used to match the view files for auto-suggestion.

Configure the PHP command like this

"Laraphense.phpCommand": "php -r \"{code}\""

this command is used to run PHP for indexing Laravel files.

Configure the Base path like this

"Laraphense.basePath": "/core"

this Base path is used to read files.

Configure the Code Base path like this

"Laraphense.basePathForCode": "/core/laravel"

This base path is used for require_once inside the PHP code.

Credits

Recommended extensions

Enjoy!