feat: add logger (#64)
* refactor(health): keep in mind new way of health check (#63) * feat(log): add logger module * refactor(utils): remove unused code * refactor(log, utils): get plugin name from config * refactor(logger): add some type annotations * refactor(utils): log notifications * feat: LOGGER™ * feat(config): TYPES * refactor(log): dont give a thing about var that is not even declared * feat(log): add easy way to open log * refactor(log): some types * update types * docs: regen * fix(log): make setting log level by config work * feat(iferr): write error to log file if occur * feat(gotests): add logger
This commit is contained in:
parent
65fa148661
commit
fbf6441f3d
10 changed files with 213 additions and 31 deletions
|
|
@ -29,6 +29,10 @@ local config = {}
|
|||
local default_config = {
|
||||
--minidoc_replace_end
|
||||
|
||||
-- log level, you might consider using DEBUG or TRACE for degugging the plugin
|
||||
---@type number
|
||||
log_level = vim.log.levels.INFO,
|
||||
|
||||
-- user specified paths to binaries
|
||||
---@class gopher.ConfigCommand
|
||||
commands = {
|
||||
|
|
@ -62,7 +66,16 @@ local default_config = {
|
|||
---@private
|
||||
local _config = default_config
|
||||
|
||||
-- I am kinda secret so don't tell anyone about me
|
||||
-- even dont use me
|
||||
--
|
||||
-- if you don't belive me that i am secret see
|
||||
-- the line below it says @private
|
||||
---@private
|
||||
_config.___plugin_name = "gopher.nvim" ---@diagnostic disable-line: inject-field
|
||||
|
||||
---@param user_config? gopher.Config
|
||||
---@private
|
||||
function config.setup(user_config)
|
||||
_config = vim.tbl_deep_extend("force", default_config, user_config or {})
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue