mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
Merge #15879 backports
This commit is contained in:
@@ -33,6 +33,17 @@ do
|
|||||||
|
|
||||||
vim.fn.mkdir(vim.fn.stdpath('cache'), "p")
|
vim.fn.mkdir(vim.fn.stdpath('cache'), "p")
|
||||||
local logfile = assert(io.open(logfilename, "a+"))
|
local logfile = assert(io.open(logfilename, "a+"))
|
||||||
|
|
||||||
|
local log_info = vim.loop.fs_stat(logfilename)
|
||||||
|
if log_info and log_info.size > 1e9 then
|
||||||
|
local warn_msg = string.format(
|
||||||
|
"LSP client log is large (%d MB): %s",
|
||||||
|
log_info.size / (1000 * 1000),
|
||||||
|
logfilename
|
||||||
|
)
|
||||||
|
vim.notify(warn_msg)
|
||||||
|
end
|
||||||
|
|
||||||
-- Start message for logging
|
-- Start message for logging
|
||||||
logfile:write(string.format("[START][%s] LSP logging initiated\n", os.date(log_date_format)))
|
logfile:write(string.format("[START][%s] LSP logging initiated\n", os.date(log_date_format)))
|
||||||
for level, levelnr in pairs(log.levels) do
|
for level, levelnr in pairs(log.levels) do
|
||||||
|
@@ -132,10 +132,6 @@ end
|
|||||||
describe('LSP', function()
|
describe('LSP', function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
clear_notrace()
|
clear_notrace()
|
||||||
end)
|
|
||||||
|
|
||||||
describe('server_name specified', function()
|
|
||||||
before_each(function()
|
|
||||||
-- Run an instance of nvim on the file which contains our "scripts".
|
-- Run an instance of nvim on the file which contains our "scripts".
|
||||||
-- Pass TEST_NAME to pick the script.
|
-- Pass TEST_NAME to pick the script.
|
||||||
local test_name = "basic_init"
|
local test_name = "basic_init"
|
||||||
@@ -164,6 +160,7 @@ describe('LSP', function()
|
|||||||
-- exec_lua("lsp.stop_all_clients(true)")
|
-- exec_lua("lsp.stop_all_clients(true)")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe('server_name specified', function()
|
||||||
it('start_client(), stop_client()', function()
|
it('start_client(), stop_client()', function()
|
||||||
retry(nil, 4000, function()
|
retry(nil, 4000, function()
|
||||||
eq(1, exec_lua('return #lsp.get_active_clients()'))
|
eq(1, exec_lua('return #lsp.get_active_clients()'))
|
||||||
|
Reference in New Issue
Block a user