Compare commits

...

2 commits

2 changed files with 5 additions and 7 deletions

View file

@ -1,16 +1,14 @@
{ ... }: { ... }:
{ {
text = '' text = ''
pid = vim.fn.getpid()
-- Disable error messages popup. -- Disable error messages popup.
-- Instead print them and write to /tmp/NeovimError<PID>.txt -- Instead print them and write to system journal.
bequiet = function(msg, log_level, opts) bequiet = function(msg, log_level, opts)
print(string.sub(tostring(msg), 1, vim.v.echospace)) print(string.sub(tostring(msg), 1, vim.v.echospace))
local file = io.open("/tmp/NeovimError"..tostring(pid)..".txt", "a") local log = io.popen("systemd-cat -t nvim", "w")
file:write(msg.."\n") log:write(tostring(msg))
file:close() log:close()
end end
vim.notify = bequiet vim.notify = bequiet

View file

@ -66,7 +66,7 @@ in
OnCalendar = "hourly"; OnCalendar = "hourly";
Persistent = true; Persistent = true;
Unit = "autoupdate.service"; Unit = "autoupdate.service";
# RandomizedDelaySec = 60; RandomizedDelaySec = 60;
}; };
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
}; };