Skip to content

Add Artisan command navigation (link, hover, completion, diagnostics) - #679

Open
farpat wants to merge 1 commit into
laravel:mainfrom
farpat:feature/artisan-command-navigation
Open

Add Artisan command navigation (link, hover, completion, diagnostics)#679
farpat wants to merge 1 commit into
laravel:mainfrom
farpat:feature/artisan-command-navigation

Conversation

@farpat

@farpat farpat commented Jul 21, 2026

Copy link
Copy Markdown

This adds navigation for Artisan command names, like the extension already does for
config, route or controllerAction.

In Artisan::call('cache:clear'), the command name is now:

  • a link: click on it to open the class of the command
  • a hover: it shows the description of the command and its file
  • a completion: it suggests all the commands of the project
  • a diagnostic: it shows a warning if the command does not exist

The class is found with reflection, so commands from Laravel and from packages work too.

The name is detected in Artisan::call(), Artisan::queue(), Schedule::command() and
$schedule->command(). When arguments are added after the name, like
Schedule::command('queue:work --stop-when-empty'), only the name is used. It is the same
idea as middleware with parameters, like auth:api.

Links and diagnostics Hover Completion

The parser does not need any change. The four options (Laravel.command.link, .hover,
.completion, .diagnostics) come from generatable.json, like the other features.

@farpat
farpat marked this pull request as ready for review July 21, 2026 09:15
@farpat
farpat force-pushed the feature/artisan-command-navigation branch from 06fe394 to ded6c29 Compare July 21, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant