diff --git a/README.md b/README.md index bc88df1671..b4bd2b11de 100644 --- a/README.md +++ b/README.md @@ -889,7 +889,8 @@ Signature help is triggered in insert mode automatically when `g:ycm_auto_trigger` is enabled and is not supported when it is not enabled. The signatures popup is hidden when there are no matching signatures or when you -leave insert mode. There is no key binding to clear the popup. +leave insert mode. If you want to manually control when it is visible, you can +map something to `YCMToggleSignatureHelp` (see below). For more details on this feature and a few demos, check out the [PR that proposed it][signature-help-pr]. @@ -3715,6 +3716,19 @@ Default: `0` let g:ycm_disable_signature_help = 1 ``` +### The `g:ycm_signature_help_disable_syntax` option + +Set this to 1 to disable syntax highlighting in the signature help popup. Thiis +can help if your colourscheme doesn't work well with the default highliting and +inverse video. + +Default: `0` + +```viml +" Disable signature help syntax highliting +let g:ycm_signature_help_disable_syntax = 1 +``` + ### The `g:ycm_gopls_binary_path` option In case the system-wide `gopls` binary is newer than the bundled one, setting diff --git a/python/ycm/signature_help.py b/python/ycm/signature_help.py index 35ced789a6..22ba1d5ca4 100644 --- a/python/ycm/signature_help.py +++ b/python/ycm/signature_help.py @@ -189,7 +189,11 @@ def UpdateSignatureHelp( state, signature_info ): # noqa if state.state == SignatureHelpState.ACTIVE: vim.eval( f'popup_show( { state.popup_win_id } )' ) - syntax = utils.ToUnicode( vim.current.buffer.options[ 'syntax' ] ) + if vim.vars.get( 'ycm_signature_help_disable_syntax', False ): + syntax = '' + else: + syntax = utils.ToUnicode( vim.current.buffer.options[ 'syntax' ] ) + active_signature = int( signature_info.get( 'activeSignature', 0 ) ) vim.eval( f"win_execute( { state.popup_win_id }, " f"'set syntax={ syntax } cursorline | "