trim lsp logfile on startup

This commit is contained in:
THEON-1
2025-11-28 16:23:09 +01:00
parent 269c827a7b
commit ecd31ab3fe
2 changed files with 14 additions and 0 deletions

12
lua/config/startup.lua Normal file
View File

@@ -0,0 +1,12 @@
local logfile = vim.lsp.log.get_filename()
local tail_process = vim.system({
"tail",
"-n 10000",
logfile,
}, {}, function(res)
vim.schedule(function ()
vim.fn.writefile(vim.split(res.stdout, "\n", {plain = true}), logfile)
end)
end)