Notepad++ uses Scintilla as its editor component. The calltip feature comes directly from scintilla. For scintilla features having no direct configuration options in the gui of Notepad++ (calltip style seems to be such a feature), you need a method to send messages to Scintilla.
One way to do that (and the only one I know of other than programming a plugin) is the use of NppExec plugin. It provides a SCI_SENDMSG
command. The scintilla website provides detailed documentation about every possible message. For your use case it says this:
Call tips are small windows displaying the arguments to a function and are displayed after the user has typed the name of the function. They normally display characters using the font facename, size and character set defined by STYLE_DEFAULT. You can choose to use STYLE_CALLTIP to define the facename, size, foreground and background colours and character set with SCI_CALLTIPUSESTYLE. This also enables support for Tab characters. There is some interaction between call tips and autocompletion lists in that showing a call tip cancels any active autocompletion list, and vice versa.
Thus we need to send the SCI_CALLTIPUSESTYLE
message and (continue reading on the website) we can configure foreground and background color with SCI_CALLTIPSETBACK
and SCI_CALLTIPSETFORE
.
So to set the color of the calltip by sending messages to the Scintilla editor component using NppExec, you need do this:
install NppExec with the PluginManager or from PluginCentral. The NppExec zip file contains the dll and some subdirectories. When installing/upgrading into Notepad++ plugin directory, take care that the subdirectories NppExec is created under the plugins directory (just unzip the file into the plugins directory). The NppExec directory contains the file Scintilla.h
which has all the definitions for the possible messages.
store these lines as a NppExec script (Plugins -> NppExec -> Execute... , enter the following lines and select save, e.g. as SetCallTipStlye):
// use CALLTIPSTYLE instead DEFAULT
SCI_SENDMSG SCI_CALLTIPUSESTYLE 0
// background to black ( 0 )
SCI_SENDMSG SCI_CALLTIPSETBACK 0
// foreground to white ( 0xffffff )
SCI_SENDMSG SCI_CALLTIPSETFORE 0xffffff
execute the script with OK
Now your calltip Window should be white on black, you might want to adopt the colors by changing the arguments.
If everything works as you expect, then Plugins -> NppExec -> Advanced Options offers the option Execute this script when Notepad++ starts on the upper right area of the config dialog. Select the script name under
which you saved the line (e.g. SetCallTipStlye)
Alas, I have not been able to find out how to configure the autocompletion style. I hoped it would use the same style as the calltip style, but autocompletion stays black on white.