Skip to content

Instantly share code, notes, and snippets.

@Robiussani152
Last active February 2, 2026 12:38
Show Gist options
  • Select an option

  • Save Robiussani152/b94289b94a8eefddb77650abeb251b7e to your computer and use it in GitHub Desktop.

Select an option

Save Robiussani152/b94289b94a8eefddb77650abeb251b7e to your computer and use it in GitHub Desktop.
Laravel Pint configuration
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+alt+f",
"command": "workbench.action.tasks.runTask",
"args": "Format Current File with Pint",
"when": "editorLangId == php"
}
]
{
"preset":"laravel",
"exclude":[
"vendor",
"node_modules",
"bootstrap/cache"
],
"rules":{
"global_namespace_import":{
"import_classes":true,
"import_functions":false,
"import_constants":false
},
"trailing_comma_in_multiline":{
"elements":[
"arguments",
"arrays",
"match",
"parameters"
]
},
"not_operator_with_successor_space":false,
"align_multiline_comment":true,
"no_empty_comment":true,
"phpdoc_separation":false,
"phpdoc_align":false,
"phpdoc_types_order":{
"null_adjustment":"always_last",
"sort_algorithm":"alpha"
},
"ordered_class_elements":{
"order":[
"use_trait",
"case",
"constant",
"constant_public",
"constant_protected",
"constant_private",
"property_public",
"property_protected",
"property_private",
"construct",
"destruct",
"magic",
"phpunit",
"method_abstract",
"method_public_static",
"method_public",
"method_protected_static",
"method_protected",
"method_private_static",
"method_private"
],
"sort_algorithm":"none"
},
"ordered_traits":true,
"no_superfluous_elseif":true,
"no_useless_else":true,
"return_assignment":false,
"explicit_indirect_variable":true,
"explicit_string_variable":true,
"octal_notation":false
}
}
{
"version": "2.0.0",
"tasks": [
{
"label": "Format Current File with Pint",
"type": "shell",
"command": "pint ${file} && echo '✅ Pint finished formatting: ${fileBasename}'",
"presentation": {
"echo": false,
"reveal": "silent",
"focus": false,
"panel": "dedicated",
"showReuseMessage": false,
"clear": false
},
"problemMatcher": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment