File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 4040
4141--- @return string
4242function ApiResponse :prettyContent ()
43- return table.concat (self :content (), " \r\ n " )
43+ return table.concat (self :content (), " \n " )
4444end
4545
4646--- @return string | nil
@@ -71,7 +71,7 @@ function ApiResponse:prettyErrors()
7171 return " "
7272 end
7373
74- return table.concat (errors , " \r\ n " )
74+ return table.concat (errors , " \n " )
7575end
7676
7777return ApiResponse
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ function M.load()
99 M .list = {}
1010 local result = api .sync (" artisan" , { " list" , " --format=json" })
1111 if result :failed () then
12- error (result :failed (), vim .log .levels .ERROR )
12+ vim .notify (result :prettyErrors (), vim .log .levels .ERROR )
13+ return false
1314 end
1415
1516 M .list = utils .from_json (result .stdout )
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ function M.load()
99 M .list = {}
1010 local result = api .sync (" artisan" , { " route:list" , " --json" })
1111 if result :failed () then
12- error (result :errors (), vim .log .levels .ERROR )
12+ vim .notify (result :prettyErrors (), vim .log .levels .ERROR )
13+ return false
1314 end
1415
1516 M .list = utils .from_json (result .stdout )
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ local actions = require "laravel.telescope.actions"
99return function (opts )
1010 opts = opts or {}
1111
12- if # commands .list == 0 then
13- commands .load ()
12+ if vim .tbl_isempty (commands .list ) then
13+ if not commands .load () then
14+ return
15+ end
1416 end
1517
1618 pickers
You can’t perform that action at this time.
0 commit comments