From 93b8bcb21b9fdc31b3b200d8649ee3517c8313cd Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Wed, 10 Feb 2021 10:22:39 +0100 Subject: [PATCH 1/3] allow gf (go to file) command also for __() method (which is an alias for trans()) --- autoload/laravel/goto.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/laravel/goto.vim b/autoload/laravel/goto.vim index dcecaa6..c0f9951 100644 --- a/autoload/laravel/goto.vim +++ b/autoload/laravel/goto.vim @@ -91,9 +91,9 @@ endfunction "" " @private -" Capture language name at cursor +" Capture language name at cursor using trans(), trans_choice() and __() method function! laravel#goto#language() abort - return s:find_name('\ Date: Thu, 4 Mar 2021 08:54:27 +0100 Subject: [PATCH 2/3] adjust expectation of class template to newest laravel 8 scallfolded style (including HasFactory) --- test/navigation.vader | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/navigation.vader b/test/navigation.vader index d8d3c58..c0217dd 100644 --- a/test/navigation.vader +++ b/test/navigation.vader @@ -405,9 +405,12 @@ Expect (class template): namespace App\Models; - class Example + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class Example extends Model { - // + use HasFactory; } Execute (edit notification): From 8f302d3e39527c4f7c3e2e10bd01a99531fb1d16 Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Thu, 4 Mar 2021 09:29:27 +0100 Subject: [PATCH 3/3] first attempt to add test to 'go to translation file' --- test/navigation.vader | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/navigation.vader b/test/navigation.vader index c0217dd..8a89136 100644 --- a/test/navigation.vader +++ b/test/navigation.vader @@ -465,3 +465,27 @@ Execute (edit routes): Expect (generic template): 0fagf + +Execute: + AssertEqual expand('%'), 'resources/lang/auth.php' + +After (clean up buffer): + bdelete + +Before (blade file with trans() function): + tabedit test/fixtures/laravel-8/resources/views/viewfile2.blade.php + +Do (Move to (a)uth.failed, jump to translation file): + i{{ trans('auth.failed') }}\0fafagf + +Execute: + AssertEqual expand('%'), 'resources/lang/auth.php' + +After (clean up buffer): + bdelete