@@ -6,6 +6,8 @@ if vim.g.loaded_laravel_nvim then
66end
77vim .g .loaded_laravel_nvim = true
88
9+ local sail = require (' laravel.sail' )
10+
911-- Check if we're in a Laravel project
1012local function is_laravel_project ()
1113 local markers = { ' artisan' , ' composer.json' , ' app/Http' , ' config/app.php' }
@@ -589,13 +591,13 @@ local function setup_commands()
589591 local root = _G .laravel_nvim .project_root
590592
591593 local commands = {
592- generate = ' php artisan ide-helper:generate' ,
593- models = ' php artisan ide-helper:models --write' ,
594- meta = ' php artisan ide-helper:meta' ,
594+ generate = sail . wrap_command ( ' php artisan ide-helper:generate' ) ,
595+ models = sail . wrap_command ( ' php artisan ide-helper:models --write' ) ,
596+ meta = sail . wrap_command ( ' php artisan ide-helper:meta' ) ,
595597 all = {
596- ' php artisan ide-helper:generate' ,
597- ' php artisan ide-helper:models --write' ,
598- ' php artisan ide-helper:meta'
598+ sail . wrap_command ( ' php artisan ide-helper:generate' ) ,
599+ sail . wrap_command ( ' php artisan ide-helper:models --write' ) ,
600+ sail . wrap_command ( ' php artisan ide-helper:meta' )
599601 }
600602 }
601603
0 commit comments