[Language] > [M] > [Microsoft Transact-SQL] does not syntax highlight my code
-
Choosing Language > M > Microsoft Transact-SQL does not syntax highlight my code. The code just stays all black.
Does this work for anybody ?Notepad++ v8.5.8 (64-bit)
Build time : Oct 15 2023 - 21:43:56
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : “C:\Program Files\Notepad++\change.log”
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 22H2
OS Build : 19045.3570
Current ANSI codepage : 1252
Plugins :
ComparePlugin (2.0.2)
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4) -
My first guess is that your theme doesn’t include the definitions – which may have happened if you had an installation from before v8.5.1 (which added MS T-SQL), then upgraded to a newer version (like the v8.5.8 that you show), or if you’re using one of the themes that hasn’t been updated (“mssql” is only present in
stylers.xml
orDarkModeDefault.xml
)Starting from a fresh Notepad++ v8.5.8 portable, it does syntax highlight MS T-SQL
So if you go to Settings > Style Configurator and do not see the MS T-SQL in the list of Languages on the left, you can grab that section from your installed directory’s
stylers.model.xml
: copy the mssql section (<LexerType name="mssql" desc="MS T-SQL" ext="">...</LexerType>
) and paste it into the installed version of your theme (either%AppData%\Notepad++\stylers.xml
for the default theme, or for other themes, go to%AppData%\Notepad++\themes\ThemeName.xml
if you have a personal copy or<install_dir>\themes\ThemeName.xml
if you just have the installed copy of the theme), then save the file and restart Notepad++. After that, MS T-SQL should be in your Style Configurator, and it should syntax highlight. If the colors don’t match with your theme, you will need to update the colors using the Style Configurator to make it look more like the other languages in your chosen theme.