mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lsp: deep copy vim.lsp.log when reloading
If vim.lsp.log is loaded the second time, the vim.log.levels will be modified with additional entries from 0-5. This will cause the require to fail as level:lower does not exists on numbered value.
This commit is contained in:
parent
8a1a256b44
commit
6974d0c6c1
@ -10,7 +10,7 @@ local log = {}
|
||||
-- Can be used to lookup the number from the name or the name from the number.
|
||||
-- Levels by name: 'trace', 'debug', 'info', 'warn', 'error'
|
||||
-- Level numbers begin with 'trace' at 0
|
||||
log.levels = vim.log.levels
|
||||
log.levels = vim.deepcopy(vim.log.levels)
|
||||
|
||||
-- Default log level is warn.
|
||||
local current_log_level = log.levels.WARN
|
||||
|
Loading…
Reference in New Issue
Block a user