nvim: lsp: Disable logging

Disable logging completely. The set_log_level call needs to be at the
top level else some log message related to startup still gets logged
if the call is done in on_attach.
This commit is contained in:
Sanchayan Maity 2022-09-18 12:16:14 +05:30
parent e5352a7ac6
commit 05c27960f7
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,8 @@ inlay_hint.setup({
}
})
vim.lsp.set_log_level("off")
local function preview_location_callback(_, result)
if result == nil or vim.tbl_isempty(result) then
return nil
@ -126,7 +128,6 @@ end
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
vim.lsp.set_log_level('warn')
if client.config.flags then
client.config.flags.allow_incremental_sync = true