refactor(log, utils): get plugin name from config

This commit is contained in:
Smirnov Oleksandr 2024-04-17 01:53:14 +03:00
parent 1bd95bf18b
commit c43b33cb60
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ local utils = {}
function utils.deferred_notify(msg, lvl) function utils.deferred_notify(msg, lvl)
vim.defer_fn(function() vim.defer_fn(function()
vim.notify(msg, lvl, { vim.notify(msg, lvl, {
title = TITLE, title = c.___plugin_name,
}) })
end, 0) end, 0)
end end
@ -15,7 +15,7 @@ end
function utils.notify(msg, lvl) function utils.notify(msg, lvl)
lvl = lvl or vim.log.levels.INFO lvl = lvl or vim.log.levels.INFO
vim.notify(msg, lvl, { vim.notify(msg, lvl, {
title = TITLE, title = c.___plugin_name,
}) })
end end

View file

@ -71,7 +71,7 @@ local _config = default_config
-- if you don't belive me that i am secret see -- if you don't belive me that i am secret see
-- the line below it says @private -- the line below it says @private
---@private ---@private
config.___plugin_name = "gopher.nvim" _config.___plugin_name = "gopher.nvim"
---@param user_config? gopher.Config ---@param user_config? gopher.Config
function config.setup(user_config) function config.setup(user_config)