From 2e69db655178fdb0d669348138e18ffafd921497 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 23 Oct 2021 01:24:32 +0800 Subject: add global variable logging_level --- lua/config/lsp.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lua/config/lsp.lua') diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index ae94b67..7cc8062 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -61,8 +61,10 @@ local custom_attach = function(client, bufnr) ]]) end - local msg = string.format("Language server %s started!", client.name) - vim.notify(msg, 'info', {title = 'Nvim-config'}) + if vim.g.logging_level == 'debug' then + local msg = string.format("Language server %s started!", client.name) + vim.notify(msg, 'info', {title = 'Nvim-config'}) + end end local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) -- cgit v1.2.3