Skip to content

Commit

Permalink
Use vim.notify
Browse files Browse the repository at this point in the history
  • Loading branch information
Furkanzmc committed Sep 19, 2023
1 parent da930f0 commit 7f4d115
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lua/firvish/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ local vim = vim
local log = {}

function log.error(msg)
vim.api.nvim_command([[echohl ErrorMsg]])
vim.api.nvim_command("echo '[firvish] " .. msg .. "'")
vim.api.nvim_command([[echohl Normal]])
vim.notify("[firvish] " .. msg, vim.log.levels.ERROR, {})
end

function log.warning(msg)
vim.api.nvim_command([[echohl WarningMsg]])
vim.api.nvim_command("echo '[firvish] " .. msg .. "'")
vim.api.nvim_command([[echohl Normal]])
vim.notify("[firvish] " .. msg, vim.log.levels.WARN, {})
end

return log

0 comments on commit 7f4d115

Please sign in to comment.