2024-10-14 22:47:51 +03:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
text = ''
|
2024-10-15 04:23:18 +03:00
|
|
|
pid = vim.fn.getpid()
|
|
|
|
|
2024-10-15 03:40:04 +03:00
|
|
|
-- Disable error messages popup.
|
2024-10-15 04:23:18 +03:00
|
|
|
-- Instead print them and write to /tmp/NeovimError<PID>.txt
|
2024-10-14 22:47:51 +03:00
|
|
|
vim.notify = function(msg, log_level, opts)
|
2024-10-15 04:23:18 +03:00
|
|
|
print(string.sub(msg, 1, vim.v.echospace))
|
|
|
|
|
2024-10-15 03:40:04 +03:00
|
|
|
local file = io.open("/tmp/NeovimError"..tostring(pid)..".txt", "a")
|
|
|
|
file:write(msg.."\n")
|
|
|
|
file:close()
|
2024-10-14 22:47:51 +03:00
|
|
|
end
|
|
|
|
'';
|
|
|
|
}
|