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('\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