trim lsp logfile on startup
This commit is contained in:
12
lua/config/startup.lua
Normal file
12
lua/config/startup.lua
Normal 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)
|
||||
|
||||
Reference in New Issue
Block a user