Neovim: Also print errors to display.
This commit is contained in:
parent
14f818974a
commit
897be283a5
|
@ -1,10 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
text = ''
|
||||
pid = vim.fn.getpid()
|
||||
|
||||
-- Disable error messages popup.
|
||||
-- Instead write them to /tmp/NeovimError<PID>.txt
|
||||
-- Instead print them and write to /tmp/NeovimError<PID>.txt
|
||||
vim.notify = function(msg, log_level, opts)
|
||||
local pid = vim.fn.getpid()
|
||||
print(string.sub(msg, 1, vim.v.echospace))
|
||||
|
||||
local file = io.open("/tmp/NeovimError"..tostring(pid)..".txt", "a")
|
||||
file:write(msg.."\n")
|
||||
file:close()
|
||||
|
|
Loading…
Reference in a new issue