[mirror] Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang

fix(_utils): set notification level

Changed files
+11 -2
lua
gopher
_utils
+11 -2
lua/gopher/_utils/init.lua
··· 38 38 end, 39 39 40 40 ---@param msg string 41 - ---@param lvl string 41 + ---@param lvl string|integer 42 42 notify = function(msg, lvl) 43 + local l 44 + if lvl == "error" or lvl == 4 then 45 + l = vim.log.levels.ERROR 46 + elseif lvl == "info" or lvl == 2 then 47 + l = vim.log.levels.INFO 48 + elseif lvl == "debug" or lvl == 1 then 49 + l = vim.log.levels.DEBUG 50 + end 51 + 43 52 vim.defer_fn(function() 44 - vim.notify(msg, lvl) 53 + vim.notify(msg, l) 45 54 end, 0) 46 55 end, 47 56 }