Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Anyone know any good resources for extending VS and VS Code syntax highlighting/intellisense?

Anyone know any good resources for extending VS and VS Code syntax highlighting/intellisense?

Scheduled Pinned Locked Moved The Lounge
visual-studioquestioncsharp
33 Posts 8 Posters 2 Views 1 Watching
  • 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.
  • H honey the codewitch

    I think the answer lies in this TextMate mess but everything I've found is incomprehensible or incomplete. Preferably I'd like it to also work with VS Code. I think the TextMate stuff does but I'm not sure as I don't know where to begin, with even finding a good place to read and start with it. This is a Visual Studio and VS Code question and I have no good place to put it.

    Real programmers use butterflies

    J Offline
    J Offline
    Jo_vb net
    wrote on last edited by
    #2

    What is wrong with VS syntax highlighting? For me it does a good job. But a codewitch like you could prefer Creating A VS Code Syntax Highlighting Extension (Part 1)[^]

    H M 2 Replies Last reply
    0
    • J Jo_vb net

      What is wrong with VS syntax highlighting? For me it does a good job. But a codewitch like you could prefer Creating A VS Code Syntax Highlighting Extension (Part 1)[^]

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #3

      It's fine, but I want it to support my own file formats, namely XBNF and RL I'm looking primarily to target VS rather than VS Code at first, and then take advantage of any overlap but I'll check that out. Thanks.

      Real programmers use butterflies

      J 1 Reply Last reply
      0
      • H honey the codewitch

        I think the answer lies in this TextMate mess but everything I've found is incomprehensible or incomplete. Preferably I'd like it to also work with VS Code. I think the TextMate stuff does but I'm not sure as I don't know where to begin, with even finding a good place to read and start with it. This is a Visual Studio and VS Code question and I have no good place to put it.

        Real programmers use butterflies

        J Offline
        J Offline
        Jacquers
        wrote on last edited by
        #4

        Try to find an existing syntax highlighting extensions that's open source.

        H 1 Reply Last reply
        0
        • J Jacquers

          Try to find an existing syntax highlighting extensions that's open source.

          H Offline
          H Offline
          honey the codewitch
          wrote on last edited by
          #5

          I've found some on github but not really documented.

          Real programmers use butterflies

          J 1 Reply Last reply
          0
          • H honey the codewitch

            I've found some on github but not really documented.

            Real programmers use butterflies

            J Offline
            J Offline
            Jacquers
            wrote on last edited by
            #6

            [Syntax Highlight Guide | Visual Studio Code ExtensionAPI](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide) [Semantic Highlight Guide | Visual Studio Code ExtensionAPI](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide) [Language Support in Visual Studio Code](https://code.visualstudio.com/docs/languages/overview)

            1 Reply Last reply
            0
            • J Jo_vb net

              What is wrong with VS syntax highlighting? For me it does a good job. But a codewitch like you could prefer Creating A VS Code Syntax Highlighting Extension (Part 1)[^]

              M Offline
              M Offline
              Matias Lopez
              wrote on last edited by
              #7

              Yes, I did some tutorials where Instructors loaded VS Extensions... IMHO, a bunch of trash! (If you try to take care of your RAM)

              1 Reply Last reply
              0
              • H honey the codewitch

                I think the answer lies in this TextMate mess but everything I've found is incomprehensible or incomplete. Preferably I'd like it to also work with VS Code. I think the TextMate stuff does but I'm not sure as I don't know where to begin, with even finding a good place to read and start with it. This is a Visual Studio and VS Code question and I have no good place to put it.

                Real programmers use butterflies

                S Offline
                S Offline
                Stefan_Lang
                wrote on last edited by
                #8

                Not sure if that's what you're looking for, and I don't know if it can be used with VS Code, but I'm very happy with the extended coloring and highlighting capabilities of Visual Assist - a Visual Studio extension by Whole Tomato Software[^] But admittedly the main use I get out of it is its outliner and VA View that gives me a host of information about any symbol I'm currently hovering over. You can find references to any symbol, and unlike Intellisense it will distinguish uses of that specific symbol from uses of a same name symbol from another context. Also the code macros and refactoring options are better than anything offered by Intellisense. There are a lot more useful features like renaming: renaming a member variable will show you every affected line as context and lets you disable those you don't want changed, and renaming a class within a file of the same name will offer to also change the file names accordingly, as well as adjust #include statements of renamed headers.

                GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                H 1 Reply Last reply
                0
                • H honey the codewitch

                  I think the answer lies in this TextMate mess but everything I've found is incomprehensible or incomplete. Preferably I'd like it to also work with VS Code. I think the TextMate stuff does but I'm not sure as I don't know where to begin, with even finding a good place to read and start with it. This is a Visual Studio and VS Code question and I have no good place to put it.

                  Real programmers use butterflies

                  T Offline
                  T Offline
                  Thornik
                  wrote on last edited by
                  #9

                  Do you understand HUGE DIFFERENCE between VS and cr@p named VS Code??

                  H 1 Reply Last reply
                  0
                  • T Thornik

                    Do you understand HUGE DIFFERENCE between VS and cr@p named VS Code??

                    H Offline
                    H Offline
                    honey the codewitch
                    wrote on last edited by
                    #10

                    You'll notice there's a complicated word in my post called "and" Once you figure out what it means, you'll answer your own question.

                    Real programmers use butterflies

                    1 Reply Last reply
                    0
                    • S Stefan_Lang

                      Not sure if that's what you're looking for, and I don't know if it can be used with VS Code, but I'm very happy with the extended coloring and highlighting capabilities of Visual Assist - a Visual Studio extension by Whole Tomato Software[^] But admittedly the main use I get out of it is its outliner and VA View that gives me a host of information about any symbol I'm currently hovering over. You can find references to any symbol, and unlike Intellisense it will distinguish uses of that specific symbol from uses of a same name symbol from another context. Also the code macros and refactoring options are better than anything offered by Intellisense. There are a lot more useful features like renaming: renaming a member variable will show you every affected line as context and lets you disable those you don't want changed, and renaming a class within a file of the same name will offer to also change the file names accordingly, as well as adjust #include statements of renamed headers.

                      GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                      H Offline
                      H Offline
                      honey the codewitch
                      wrote on last edited by
                      #11

                      I'm looking for ways to extend Visual Studio to highlight my own files. I don't think Visual Assist will help me there? I also don't want end users to have to install it to highlight my files.

                      Real programmers use butterflies

                      S 2 Replies Last reply
                      0
                      • H honey the codewitch

                        I'm looking for ways to extend Visual Studio to highlight my own files. I don't think Visual Assist will help me there? I also don't want end users to have to install it to highlight my files.

                        Real programmers use butterflies

                        S Offline
                        S Offline
                        Stefan_Lang
                        wrote on last edited by
                        #12

                        You can tell VA to interpret files without extensions as C++ headers, or tell it to interpret files with custum extensions as code files. See Custom File Extensions[^]

                        GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                        1 Reply Last reply
                        0
                        • H honey the codewitch

                          I'm looking for ways to extend Visual Studio to highlight my own files. I don't think Visual Assist will help me there? I also don't want end users to have to install it to highlight my files.

                          Real programmers use butterflies

                          S Offline
                          S Offline
                          Stefan_Lang
                          wrote on last edited by
                          #13

                          honey the codewitch wrote:

                          I also don't want end users to have to install it to highlight my files.

                          I'm not sure I understand this part. Are you saying you have source files with non-standard extensions that your end users are looking at? If so, then maybe the cost or effort to install VA may not be worth it. However, VisualStudio also has the feature to interpret files with custom extensions as C++. Not sure where in the settings this is hiding. But it would at least enable the built-in highlighting capabilities.

                          GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                          1 Reply Last reply
                          0
                          • H honey the codewitch

                            It's fine, but I want it to support my own file formats, namely XBNF and RL I'm looking primarily to target VS rather than VS Code at first, and then take advantage of any overlap but I'll check that out. Thanks.

                            Real programmers use butterflies

                            J Offline
                            J Offline
                            Jo_vb net
                            wrote on last edited by
                            #14

                            For your own file formats you could write a small external tool and add it to VS with the external tools manager. I have a log analyser where I load the plain text to a rich text box. For each wanted color I have a list with keywords. A simple function formats the content of the rich text box. Then after formatting the text it shows the desired result.

                            H 1 Reply Last reply
                            0
                            • J Jo_vb net

                              For your own file formats you could write a small external tool and add it to VS with the external tools manager. I have a log analyser where I load the plain text to a rich text box. For each wanted color I have a list with keywords. A simple function formats the content of the rich text box. Then after formatting the text it shows the desired result.

                              H Offline
                              H Offline
                              honey the codewitch
                              wrote on last edited by
                              #15

                              Yeah, I already have an app that syntax highlights, and frankly it works better than a rich text box. I'm really hoping for something more integrated, and wedging my app in in place of an actual native-VS editor because I don't know how to use TextMate seems less than ideal. I'm looking over some of the VS code links, and I hope that stuff transfers to VS. I think they both can use TextMate, although VS has another thing you can use too that's code based.

                              Real programmers use butterflies

                              J 1 Reply Last reply
                              0
                              • H honey the codewitch

                                Yeah, I already have an app that syntax highlights, and frankly it works better than a rich text box. I'm really hoping for something more integrated, and wedging my app in in place of an actual native-VS editor because I don't know how to use TextMate seems less than ideal. I'm looking over some of the VS code links, and I hope that stuff transfers to VS. I think they both can use TextMate, although VS has another thing you can use too that's code based.

                                Real programmers use butterflies

                                J Offline
                                J Offline
                                Jo_vb net
                                wrote on last edited by
                                #16

                                Do your own file formats contain Program Code or what kind of data?

                                H 1 Reply Last reply
                                0
                                • J Jo_vb net

                                  Do your own file formats contain Program Code or what kind of data?

                                  H Offline
                                  H Offline
                                  honey the codewitch
                                  wrote on last edited by
                                  #17

                                  Grammars and lexer specs. The grammars are an attributed variation of EBNF format called XBNF The lexer specs are my own format, and it's basically attributed name value pairs where the values are either regex expressions or string literals.

                                  Real programmers use butterflies

                                  J 1 Reply Last reply
                                  0
                                  • H honey the codewitch

                                    Grammars and lexer specs. The grammars are an attributed variation of EBNF format called XBNF The lexer specs are my own format, and it's basically attributed name value pairs where the values are either regex expressions or string literals.

                                    Real programmers use butterflies

                                    J Offline
                                    J Offline
                                    Jo_vb net
                                    wrote on last edited by
                                    #18

                                    Can the VS Editor open/read your files with ParentGrammars and lexer specs? And would you know a way to add your own highlighting rules to VS / VS Editor?

                                    H 1 Reply Last reply
                                    0
                                    • J Jo_vb net

                                      Can the VS Editor open/read your files with ParentGrammars and lexer specs? And would you know a way to add your own highlighting rules to VS / VS Editor?

                                      H Offline
                                      H Offline
                                      honey the codewitch
                                      wrote on last edited by
                                      #19

                                      To your first question, I don't think so. To your second question, that's exactly what I'm asking about in the OP.

                                      Real programmers use butterflies

                                      J 1 Reply Last reply
                                      0
                                      • H honey the codewitch

                                        To your first question, I don't think so. To your second question, that's exactly what I'm asking about in the OP.

                                        Real programmers use butterflies

                                        J Offline
                                        J Offline
                                        Jo_vb net
                                        wrote on last edited by
                                        #20

                                        You wrote earlier: I want it to support my own file formats, namely XBNF and RL So you could add those files to your VS project and when it appears in the Project Explorer, try to open it.

                                        H 1 Reply Last reply
                                        0
                                        • J Jo_vb net

                                          You wrote earlier: I want it to support my own file formats, namely XBNF and RL So you could add those files to your VS project and when it appears in the Project Explorer, try to open it.

                                          H Offline
                                          H Offline
                                          honey the codewitch
                                          wrote on last edited by
                                          #21

                                          Yes, I already do that. It opens them as plain text files. Why would it do otherwise? It has no way of automatically discerning the syntax. Are you having a go at me?

                                          Real programmers use butterflies

                                          J 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups