mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
add global variable logging_level
This commit is contained in:
parent
e2a8687e48
commit
2e69db6551
@ -4,6 +4,7 @@
|
|||||||
let g:is_win = (has('win32') || has('win64')) ? v:true : v:false
|
let g:is_win = (has('win32') || has('win64')) ? v:true : v:false
|
||||||
let g:is_linux = (has('unix') && !has('macunix')) ? v:true : v:false
|
let g:is_linux = (has('unix') && !has('macunix')) ? v:true : v:false
|
||||||
let g:is_mac = has('macunix') ? v:true : v:false
|
let g:is_mac = has('macunix') ? v:true : v:false
|
||||||
|
let g:logging_level = 'debug'
|
||||||
"}}
|
"}}
|
||||||
|
|
||||||
"{{ Builtin variables
|
"{{ Builtin variables
|
||||||
|
|||||||
@ -85,8 +85,10 @@ let s:colorscheme_func = printf('s:my_theme_dict.%s()', s:theme)
|
|||||||
|
|
||||||
if has_key(s:my_theme_dict, s:theme)
|
if has_key(s:my_theme_dict, s:theme)
|
||||||
execute 'call ' . s:colorscheme_func
|
execute 'call ' . s:colorscheme_func
|
||||||
|
if g:logging_level == 'debug'
|
||||||
let s:msg1 = "Currently loaded theme: " . s:theme
|
let s:msg1 = "Currently loaded theme: " . s:theme
|
||||||
call v:lua.vim.notify(s:msg1, 'info', {'title': 'nvim-config'})
|
call v:lua.vim.notify(s:msg1, 'info', {'title': 'nvim-config'})
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
let s:msg = "Invalid colorscheme function: " . s:colorscheme_func
|
let s:msg = "Invalid colorscheme function: " . s:colorscheme_func
|
||||||
call v:lua.vim.notify(s:msg, 'error', {'title': 'nvim-config'})
|
call v:lua.vim.notify(s:msg, 'error', {'title': 'nvim-config'})
|
||||||
|
|||||||
@ -61,9 +61,11 @@ local custom_attach = function(client, bufnr)
|
|||||||
]])
|
]])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if vim.g.logging_level == 'debug' then
|
||||||
local msg = string.format("Language server %s started!", client.name)
|
local msg = string.format("Language server %s started!", client.name)
|
||||||
vim.notify(msg, 'info', {title = 'Nvim-config'})
|
vim.notify(msg, 'info', {title = 'Nvim-config'})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user