@@ -38,6 +38,30 @@ _G._telescope_collections = function(picker_type)
3838		:find ()
3939end 
4040
41+ _G ._toggle_inlayhint  =  function ()
42+ 	local  is_enabled  =  vim .lsp .inlay_hint .is_enabled ()
43+ 
44+ 	vim .lsp .inlay_hint .enable (not  is_enabled )
45+ 	vim .notify (
46+ 		(is_enabled  and  " Inlay hint disabled successfully"  or  " Inlay hint enabled successfully" 
47+ 		vim .log .levels .INFO ,
48+ 		{ title  =  " LSP Inlay Hint"  
49+ 	)
50+ end 
51+ 
52+ local  _vt_enabled  =  require (" core.settings" diagnostics_virtual_text 
53+ _G ._toggle_diagnostic  =  function ()
54+ 	if  vim .diagnostic .is_enabled () then 
55+ 		_vt_enabled  =  not  _vt_enabled 
56+ 		vim .diagnostic [_vt_enabled  and  " show"  or  " hide" 
57+ 		vim .notify (
58+ 			(_vt_enabled  and  " Virtual text is now displayed"  or  " Virtual text is now hidden" 
59+ 			vim .log .levels .INFO ,
60+ 			{ title  =  " LSP Diagnostic"  
61+ 		)
62+ 	end 
63+ end 
64+ 
4165_G ._flash_esc_or_noh  =  function ()
4266	local  flash_active , state  =  pcall (function ()
4367		return  require (" flash.plugins.char" state 
@@ -49,31 +73,6 @@ _G._flash_esc_or_noh = function()
4973	end 
5074end 
5175
52- _G ._toggle_inlayhint  =  function ()
53- 	if  vim .lsp .inlay_hint .is_enabled () then 
54- 		vim .lsp .inlay_hint .enable (false )
55- 		vim .notify (" Disable inlay hint successfully!" vim .log .levels .INFO , { title  =  " LSP Inlay Hint"  
56- 	else 
57- 		vim .lsp .inlay_hint .enable (true )
58- 		vim .notify (" Enable inlay hint successfully!" vim .log .levels .INFO , { title  =  " LSP Inlay Hint"  
59- 	end 
60- end 
61- 
62- local  _diagnostic  =  1 
63- _G ._toggle_diagnostic  =  function ()
64- 	if  vim .diagnostic .is_enabled () then 
65- 		if  _diagnostic  ==  1  then 
66- 			_diagnostic  =  0 
67- 			vim .diagnostic .hide ()
68- 			vim .notify (" Hide virtual text successfully!" vim .log .levels .INFO , { title  =  " LSP Diagnostic"  
69- 		else 
70- 			_diagnostic  =  1 
71- 			vim .diagnostic .show ()
72- 			vim .notify (" Show virtual text successfully!" vim .log .levels .INFO , { title  =  " LSP Diagnostic"  
73- 		end 
74- 	end 
75- end 
76- 
7776--- @param  program  string 
7877local  function  not_found_notify (program )
7978	vim .notify (string.format (" [%s] not found!" program ), vim .log .levels .ERROR , { title  =  " toggleterm.nvim"  
0 commit comments