nix/home/config/nvim/module/config/Notify.nix

17 lines
388 B
Nix
Raw Normal View History

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