Skip to content

Commit

Permalink
fix(notifications): use vim.log.levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Mendes committed Nov 9, 2024
1 parent f29c85a commit 22761df
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion autoload/db_ui/notifications.vim
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ function! s:notification_nvim_notify(msg, opts) abort
if get(a:opts, 'delay')
let opts.timeout = { 'timeout': a:opts.delay }
endif
return luaeval('vim.notify(_A[1], _A[2], _A[3])', [a:msg, type, opts])

let log_levels = {
\ 'info': luaeval("vim.log.levels.INFO"),
\ 'error': luaeval("vim.log.levels.ERROR"),
\ 'warning': luaeval("vim.log.levels.WARN")
\ }

return luaeval('vim.notify(_A[1], _A[2], _A[3])', [a:msg, log_levels[type], opts])
endfunction

function! s:notification_nvim(msg, opts) abort
Expand Down

0 comments on commit 22761df

Please sign in to comment.