Community
    • Login

    [Language] > [M] > [Microsoft Transact-SQL] does not syntax highlight my code

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 626 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      victor-sahag
      last edited by

      Choosing Language > M > Microsoft Transact-SQL does not syntax highlight my code. The code just stays all black.
      Does this work for anybody ?

      syntax_hilite.jpg

      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)

      PeterJonesP 1 Reply Last reply Reply Quote 1
      • PeterJonesP
        PeterJones @victor-sahag
        last edited by PeterJones

        @victor-sahag ,

        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 or DarkModeDefault.xml)

        Starting from a fresh Notepad++ v8.5.8 portable, it does syntax highlight MS T-SQL
        9dd4dae3-7230-445a-b960-f7625857c1b0-image.png

        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.

        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors