Initial commit

This commit is contained in:
2024-10-02 14:54:32 +02:00
commit 14af275c5c
27 changed files with 1871 additions and 0 deletions

25
lua/cave/log/init.lua Normal file
View File

@@ -0,0 +1,25 @@
---@class cave.Log
local Log = {}
---@param msg string
---@param level integer
---@param ...? any
local function notify(msg, level, ...) vim.notify(msg:format(...), level, { title = "cave.nvim" }) end
---@param msg string
---@param ...? any
function Log.dbg(msg, ...) notify(msg, vim.log.levels.DEBUG, ...) end
---@param msg string
---@param ...? any
function Log.err(msg, ...) notify(msg, vim.log.levels.ERROR, ...) end
---@param msg string
---@param ...? any
function Log.inf(msg, ...) notify(msg, vim.log.levels.INFO, ...) end
---@param msg string
---@param ...? any
function Log.warn(msg, ...) notify(msg, vim.log.levels.WARN, ...) end
return Log