{"id":15431445,"url":"https://github.com/yaegassy/coc-laravel","last_synced_at":"2025-04-19T17:24:26.465Z","repository":{"id":181123093,"uuid":"666257697","full_name":"yaegassy/coc-laravel","owner":"yaegassy","description":"Laravel extension for coc.nvim","archived":false,"fork":false,"pushed_at":"2024-01-13T07:44:06.000Z","size":753,"stargazers_count":33,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T15:04:08.982Z","etag":null,"topics":["blade","coc","coc-extensions","coc-laravel","coc-nvim","laravel","laravel-blade","neovim","php","vim"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@yaegassy/coc-laravel","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaegassy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-14T04:46:27.000Z","updated_at":"2025-02-18T05:28:56.000Z","dependencies_parsed_at":"2024-10-20T12:18:07.580Z","dependency_job_id":null,"html_url":"https://github.com/yaegassy/coc-laravel","commit_stats":{"total_commits":304,"total_committers":1,"mean_commits":304.0,"dds":0.0,"last_synced_commit":"3bd03b79044b0429c476968a20e79d02a0495dc7"},"previous_names":["yaegassy/coc-laravel"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaegassy","download_url":"https://codeload.github.com/yaegassy/coc-laravel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249747932,"owners_count":21319802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blade","coc","coc-extensions","coc-laravel","coc-nvim","laravel","laravel-blade","neovim","php","vim"],"created_at":"2024-10-01T18:22:21.002Z","updated_at":"2025-04-19T17:24:26.438Z","avatar_url":"https://github.com/yaegassy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coc-laravel\n\nLaravel extension for [coc.nvim](https://github.com/neoclide/coc.nvim).\n\n## Install\n\n**CocInstall**:\n\n```vim\n:CocInstall @yaegassy/coc-laravel\n```\n\n\u003e scoped packages\n\n**vim-plug**:\n\n```vim\nPlug 'yaegassy/coc-laravel', {'do': 'yarn install --frozen-lockfile'}\n```\n\n## Features\n\n**Note**:\n\nThis coc-extension executes `artisan` commands in the background for some features. Therefore, you must be able to run `PHP` in your environment.\n\n---\n\nThis coc-extension will provide various completion features and more features for Laravel projects.\n\n- Completions\n  - Component completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1650935001)\n  - Livewire completion (Also compatible with Livewire `v3`!)\n    - Livewire tag completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1658762452)\n    - Livewire action completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1658765335)\n    - Livewire event completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1658766120)\n    - Livewire property completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1659497932)\n    - Livewire directive completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1659296731)\n  - PHP completion in PHP-related region of Blade file\n    - **[NOTE]**: To use this feature, please execute the `laravel.stubs.download` command.\n    - PHP Function completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1643359916)\n    - PHP Class completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1671277304)\n    - PHP Static Class completion (Static class members and constants, e.g. `DateTime::|`) | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1674415047)\n    - PHP Object Member completion (e.g. `$obj-\u003e|`) | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1678240483)\n    - PHP Variable completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1676733936)\n    - PHP Constant completion | [DESCRIPTION](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1671281861)\n    - PHP Keyword completion | [DESCRIPTION](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1671284071)\n  - Directive completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1657000532)\n  - Config completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1635266998)\n  - Env completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1635267885)\n  - Validation completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1635268664)\n  - Route completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1635269933)\n  - View completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1635271315)\n  - Middleware completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1635271630)\n  - Guard completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1635272378)\n  - Translation completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1637244306)\n  - Method directive parameter completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1647629965)\n  - View reference variable completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1695541537)\n  - Eloquent model field completion | [DEMO](https://github.com/yaegassy/coc-laravel/issues/1#issuecomment-1692855711)\n    - Completion feature using `_ide_helper_models.php` file generated by [laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper)\n  - Misc\n    - Please install [coc-blade](https://github.com/yaegassy/coc-blade), it is implemented in [coc-blade](https://github.com/yaegassy/coc-blade)\n- Definitions\n  - View definition | [DEMO](https://github.com/yaegassy/coc-laravel/issues/2#issuecomment-1644973067)\n    - [PHP -\u003e Blade] Definition jump to the Blade template specified by the view() function.\n  - Blade View definition | [DEMO](https://github.com/yaegassy/coc-laravel/issues/2#issuecomment-1644973626)\n    - [Blade -\u003e Blade] Jump to the Blade template specified by the `@extends` and `@include` directives.\n  - Component definition | [DEMO](https://github.com/yaegassy/coc-laravel/issues/2#issuecomment-1644974475)\n    - [Blade -\u003e PHP or Blade] Jump to the component file. Both class components and anonymous components are supported.\n  - Livewire tag definition | [DEMO](https://github.com/yaegassy/coc-laravel/issues/2#issuecomment-1658759781)\n    - [Blade -\u003e PHP or Blade] Jump to the livewire file. Both livewire class and blade template are supported.\n  - Livewire directive definition | [DEMO](https://github.com/yaegassy/coc-laravel/issues/2#issuecomment-1659297842)\n    - [Blade -\u003e PHP or Blade] Jump to the livewire file. Both livewire class and blade template are supported.\n- References\n  - `laravel.view.findAllReferences` command | [DEMO](https://github.com/yaegassy/coc-laravel/issues/3#issuecomment-1645929779)\n    - [Blade -\u003e PHP] Show references to PHP files that use the current blade\n      file. Referenced directories are `routes`, `app/Http/Controllers`,\n      `app/View/Components`, `app/Http/Livewire` and `app/Livewire`.\n  - View reference | [DEMO](https://github.com/yaegassy/coc-laravel/issues/3#issuecomment-1645932674)\n    - [PHP -\u003e Blade] Reference to a PHP file that uses the same template in the view function.\n- Hovers\n  - ComponentTag Hover | [DEMO](https://github.com/yaegassy/coc-laravel/issues/4#issue-1816594130)\n- Diagnostics\n  - Missing component validation | [DEMO](https://github.com/yaegassy/coc-laravel/issues/5#issuecomment-1657287255)\n  - Method directive parameter validation | [DEMO](https://github.com/yaegassy/coc-laravel/issues/5#issuecomment-1647636587)\n  - [TODO]\n    - Diagnostic features will be added as we come up with useful ones, based on projects already analyzed.\n- CodeActions\n  - Create blade component | [DEMO](https://github.com/yaegassy/coc-laravel/issues/6#issuecomment-1657002340)\n  - Fix method directive parameter | [DEMO](https://github.com/yaegassy/coc-laravel/issues/6#issuecomment-1648914444)\n  - [TODO]\n    - CodeAction features will be added as we come up with useful ones, based on projects already analyzed.\n- Artisan and Sail commands integration\n  - `laravel.artisan.run` command feature.\n  - `laravel.sailArtisan.run` command feature.\n\n## [RECOMMENDED] Additional installation of \"watchman\"\n\n`coc-laravel` uses the `workspace/didChangeWatchedFiles` notification to monitor files in the project.\n\nIn coc.nvim, it is recommended to install [watchman](https://facebook.github.io/watchman/) in order to utilize this feature.\n\n- See: \u003chttps://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions\u003e\n\nIf you have difficulty installing `watchman`, you can use `coc-laravel` without `watchman`, but you may not be able to immediately use IntelliSense with the newly added files.\n\nIn this case, please manually enter the following command.\n\n- `:CocCommand laravel.project.restart`\n\nor\n\n- `:CocRestart`\n\n## workspaceFolders\n\nDepending on the project like mono repo or how Vim/Neovim is started, `workspaceFolders` may not be recognized correctly.\n\nTo make coc.nvim recognize `workspaceFolders` correctly, you can set `b:coc_root_patterns` in .vimrc/init.vim\n\n**Example**:\n\n```vim\n  au FileType php,blade let b:coc_root_patterns = ['.git', '.env', 'composer.json', 'artisan']\n```\n\nFor more information, check this coc.nvim's wiki.\n\n- \u003chttps://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders\u003e\n\n## Configuration options\n\n- `laravel.enable`: Enable coc-laravel extension, default: `true`\n- `laravel.environment.phpPath`: Path to PHP, you can use a custom version of PHP. If there is no setting, `php` of the execution environment will be used, default: `\"\"`\n- `laravel.project.excludeVendors`: List of target vendor directories to exclude during project analysis, e.g. `[\"fakerphp\", \"phpunit\"]`, default: `[]`\n- `laravel.project.startupMessageEnable`: Enable project startup messages, default: `true`\n- `laravel.stubs.customVersion`: Specify the version of stubs to download with the `laravel.stubs.download` command. If not set, the `stubsVersion` defined in `package.json` will be used, default: `\"\"`\n- `laravel.stubs.useStubs`: List of stubs to be used, default: `[\"Core\", \"date\", \"standard\"]`\n- `laravel.completion.enable`: Enable all completion feature, default: `true`\n- `laravel.completion.directiveEnable`: Enable directive completion, default: `true`\n- `laravel.completion.directiveList`: List of directive used in directive completion, default: Omitted due to the large number of settings, See configuration in [package.json](/package.json)\n- `laravel.completion.configEnable`: Enable config completion, default: `true`\n- `laravel.completion.envEnable`: Enable env completion, default: true\n- `laravel.completion.validationEnable`: Enable validation completion.\n- `laravel.completion.routeEnable`: Enable route completion, default: `true`\n- `laravel.completion.viewEnable`: Enable view completion, default: `true`\n- `laravel.completion.middlewareEnable`: Enable middleware completion, default: `true`\n- `laravel.completion.guardEnable`: Enable guard completion, default: `true`\n- `laravel.completion.translationEnable`: Enable translation completion, default: `true`\n- `laravel.completion.componentEnable`: Enable component completion, default: `true`\n- `laravel.completion.phpFunctionEnable`: Enable php function completion, default: `true`\n- `laravel.completion.phpFunction.stubsEnable`: Enable stubs in phpFunction completion, default: `true`\n- `laravel.completion.phpFunction.vendorEnable`: Enable vendor in phpFunction completion, default: `true`\n- `laravel.completion.phpClassEnable`: Enable php class completion, default: `true`\n- `laravel.completion.phpClass.stubsEnable`: Enable stubs in phpClass completion, default: `true`\n- `laravel.completion.phpClass.vendorEnable`: Enable vendor in phpClass completion, default: `true`\n- `laravel.completion.phpConstantEnable`: Enable php constant completion, default: `true`\n- `laravel.completion.phpConstant.stubsEnable`: Enable stubs in phpConstant completion, default: `true`\n- `laravel.completion.phpConstant.vendorEnable`: Enable vendor in phpConstant completion, default: `true`\n- `laravel.completion.phpStaticClassEnable`: Enable php static class completion, default: `true`\n- `laravel.completion.phpObjectMemberEnable`: Enable php object member completion, default: `true`\n- `laravel.completion.phpVariableEnable`: Enable php variable completion, default: `true`\n- `laravel.completion.phpKeywordEnable`: Enable php keyword completion, default: `true`\n- `laravel.completion.eloquentModelFieldEnable`: Enable eloquent model field completion, default: `true`\n- `laravel.completion.viewReferenceVariableEnable`: Enable view reference variable completion, default: `true`\n- `laravel.completion.methodParameterEnable`: Enable method parameter completion, default: `true`\n- `laravel.completion.livewireEnable`: Enable livewire completion, default: `true`\n- `laravel.livewire.wireClickAttributes`: List of click related action to be added to `wire:xxxx`, default: `[\"click\", \"click.prefetch\"]`\n- `laravel.livewire.wireModelAttributes`: List of model related action to be added to `wire:xxxx`, default: `[\"model\", \"model.debounce.100ms\", \"model.lazy\", \"model.defer\"]`\n- `laravel.livewire.wireEventAttributes`: List of browser events to be added to `wire:xxxx`. No need for `wire:model` or `wire:click`. default: Omitted due to the large number of settings, See configuration in [package.json](/package.json)\n- `laravel.definition.enable`: Enable definition, default `true`\n- `laravel.reference.enable`: Enable reference, default `true`\n- `laravel.hover.enable`: Enable hover, default `true`\n- `laravel.diagnostic.enable`: Enable diagnostic, default: `true`\n- `laravel.codeAction.enable`: Enable code action, default: `true`\n- `laravel.artisan.withoutArgumentsCommandList`: List of commands to quickly execute `laravel.artisan.run` or `laravel.sailArtisan.run` without prompting for arguments or options, e.g. `[\"route:list\", \"clear-compiled\"]`, default: `[]`\n- `laravel.artisan.enableSplitRight`: Use vertical belowright for artisan terminal window, default: `false`\n\n## Commands\n\n- `laravel.project.restart`: Run project restart\n- `laravel.project.stats`: (Develop) Show project stats\n- `laravel.project.finder`: (Develop) Run project finder\n- `laravel.stubs.download`: Download stubs\n- `laravel.stubs.version`: Show the version of stubs\n- `laravel.artisan.run`: Run artisan command\n- `laravel.sailArtisan.run`: Run sail artisan command\n- `laravel.view.findAllReferences`: Find view file references\n- `laravel.showOutput`: Show laravel output channel\n\n## CodeActions\n\n**Example key mapping (Code Action related)**:\n\n```vim\nnmap \u003csilent\u003e ga \u003cPlug\u003e(coc-codeaction-line)\nnmap \u003csilent\u003e \u003cleader\u003eac \u003cPlug\u003e(coc-codeaction-cursor)\n```\n\n**Actions**:\n\n- `Create blade component`\n- `Fix method directive parameter`\n\n## Recommended coc-extensions for php\n\n- [@yaegassy/coc-intelephense](https://github.com/yaegassy/coc-intelephense)\n- [coc-blade](https://github.com/yaegassy/coc-blade)\n- [@yaegassy/coc-phpstan](https://github.com/yaegassy/coc-phpstan)\n- [coc-php-cs-fixer](https://github.com/yaegassy/coc-php-cs-fixer)\n- [coc-psalm](https://github.com/yaegassy/coc-psalm)\n\n## Inspired Projects\n\n- [amir9480/vscode-laravel-extra-intellisense](https://github.com/amir9480/vscode-laravel-extra-intellisense) | (VSCode extension)\n- [Laravel Idea](https://laravel-idea.com/) | (PhpStorm plugin)\n- [haringsrob/laravel-dev-tools](https://github.com/haringsrob/laravel-dev-tools)\n- and More...\n\n## Thanks\n\n- [glayzzle/php-parser](https://github.com/glayzzle/php-parser)\n- [Stillat/blade-parser-typescript](https://github.com/Stillat/blade-parser-typescript)\n- [JetBrains/phpstorm-stubs](https://github.com/JetBrains/phpstorm-stubs)\n- [microsoft/vscode-html-languageservice](https://github.com/microsoft/vscode-html-languageservice)\n\n## License\n\nMIT\n\n---\n\n\u003e This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegassy%2Fcoc-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaegassy%2Fcoc-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegassy%2Fcoc-laravel/lists"}