Spice up your source code with new colors in AL and Business Central

Поділитися
Вставка

КОМЕНТАРІ • 12

  • @madpsychobilly
    @madpsychobilly 2 роки тому +1

    Wow, never knew about that, thanks for sharing !

  • @timxams7180
    @timxams7180 2 роки тому

    Hi Erik, Did you do something special besides the semanticHightlighting? I have activated the property and using it for almost a month but my procedures and parameters don't turn in another color like yours. (green and orange)

    • @Hougaard
      @Hougaard  2 роки тому

      Nope, nothing.

    • @timxams7180
      @timxams7180 2 роки тому

      @@Hougaard I have found the solution.😀
      I have added in my workspace settings the following:
      "editor.semanticTokenColorCustomizations":{
      "enabled": true,
      "rules": { "function":{
      "foreground": "#4de73f"
      },
      "parameter": {
      "foreground": "#ff9900",
      "fontStyle": "italic"
      }
      }
      }

  • @andrius4389
    @andrius4389 2 роки тому

    Great video! It would be great to be able to set different colors for global and local variables though. I wonder if it is possible to write regex for something like that...

    • @Hougaard
      @Hougaard  2 роки тому +1

      You can't RegEx to identify locals vs. globals, but Microsoft could easily color then differently (if they wanted to)

  • @klauskaan6320
    @klauskaan6320 2 роки тому

    Nice one!

  • @RadoArvay
    @RadoArvay 2 роки тому

    What is your experience with this option? After new start or reload of VSC, the setup is not applied and I need to re-select a theme.

    • @JosepPages7
      @JosepPages7 2 роки тому

      Yes, me too, after new start of VSC this option doesn't work. Very thanks Erik for this channel!

    • @RadoArvay
      @RadoArvay 2 роки тому

      Hm, I have tried it on a single folder project now and it works (semantic colours appear theirself after while). Before, it was multifolder workspace.

    • @s0m3C0d3r
      @s0m3C0d3r 2 роки тому +1

      FYI:
      The semantic color highlighting is working with the compiler. As it's AL you must wait until the "AL Language" is initialized (the "AL Language" extension contains the alc.exe -> Compiler).
      If you open (for example) a folder / workspace, you can see on the bottom right corner that "AL Language" is setting everything up for development.
      Once it's finished you can close a file and open it up again and the semantic color highlighting should be there.
      So the solution is:
      - Waiting
      If the issue is still existing, then... yea... I don't know then. :D

    • @RadoArvay
      @RadoArvay 2 роки тому +1

      @@s0m3C0d3r Yeah, the waiting is needed, I know :-). It seams that - when a semantic does not appear - the first action of AL compiler gets it back.