Skip to content

Commit 00229e7

Browse files
committed
feat: move notification for main.lua not found into user cmd
1 parent 06f1363 commit 00229e7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: lua/love2d/init.lua

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ love2d.find_src_path = function(path)
1515
main = vim.fn.findfile("main.lua", path)
1616
end
1717
if main == "" then
18-
vim.notify("No main.lua file found", vim.log.levels.ERROR)
1918
return
2019
end
2120
return vim.fn.fnamemodify(main, ":h")

Diff for: plugin/love2d.lua

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ vim.api.nvim_create_user_command("LoveRun", function(args)
33
local path = love2d.find_src_path(args.args)
44
if path then
55
love2d.run(path)
6+
else
7+
vim.notify("No main.lua file found", vim.log.levels.ERROR)
68
end
79
end, { nargs = "?", complete = "dir" })
810

0 commit comments

Comments
 (0)