Skip to content

Commit

Permalink
feat: move notification for main.lua not found into user cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
S1M0N38 committed Feb 11, 2024
1 parent 06f1363 commit 00229e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion lua/love2d/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ love2d.find_src_path = function(path)
main = vim.fn.findfile("main.lua", path)
end
if main == "" then
vim.notify("No main.lua file found", vim.log.levels.ERROR)
return
end
return vim.fn.fnamemodify(main, ":h")
Expand Down
2 changes: 2 additions & 0 deletions plugin/love2d.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ vim.api.nvim_create_user_command("LoveRun", function(args)
local path = love2d.find_src_path(args.args)
if path then
love2d.run(path)
else
vim.notify("No main.lua file found", vim.log.levels.ERROR)
end
end, { nargs = "?", complete = "dir" })

Expand Down

0 comments on commit 00229e7

Please sign in to comment.