feat: LOGGER™
This commit is contained in:
parent
a2710261bf
commit
a293b9e8d3
2 changed files with 6 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ function utils.deferred_notify(msg, lvl)
|
|||
vim.notify(msg, lvl, {
|
||||
title = c.___plugin_name,
|
||||
})
|
||||
log.info(msg)
|
||||
log.debug(msg)
|
||||
end, 0)
|
||||
end
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ function utils.notify(msg, lvl)
|
|||
vim.notify(msg, lvl, {
|
||||
title = c.___plugin_name,
|
||||
})
|
||||
log.info(msg)
|
||||
log.debug(msg)
|
||||
end
|
||||
|
||||
-- safe require
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
---@usage Execute `:GoCmt` to generate a comment for the current function/method/struct/etc on this line.
|
||||
---@text This module provides a way to generate comments for Go code.
|
||||
|
||||
local log = require "gopher._utils.log"
|
||||
|
||||
local function generate(row, col)
|
||||
local ts_utils = require "gopher._utils.ts"
|
||||
local comment, ns = nil, nil
|
||||
|
|
@ -38,6 +40,8 @@ return function()
|
|||
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
local comment, ns = generate(row + 1, col + 1)
|
||||
|
||||
log.debug("generated comment: " .. comment)
|
||||
|
||||
vim.api.nvim_win_set_cursor(0, {
|
||||
ns.dim.s.r,
|
||||
ns.dim.s.c,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue