Anyone know any good resources for extending VS and VS Code syntax highlighting/intellisense?
-
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?
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
-
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
-
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.
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
-
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
The easy part is to get syntax highlighting for alternate file extension: https://stackoverflow.com/questions/21499143/how-to-get-syntax-highlighting-for-alternate-file-extension-for-visual-studio-20 Go to Tools -> Options -> Text Editor -> File Extension And type your alternative extension And then associate it with your editor (e.g. Microsoft Visual C++) The challenge is to add your custom highlighting list to VS / VS Editor!
-
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
-
It looks like add new [code] language to VS Code is the only way to go. Colorizer - vscode-docs[^]
There are ways to do it with visual studio as well.
Real programmers use butterflies
-
There are ways to do it with visual studio as well.
Real programmers use butterflies
-
How many different words / strings are in your custom (grammar) file? Would it be good enough to highlight all of them with the same backcolor?
I'm tired of this conversation. Look, I told you what I was looking for. The rest is just wasting time, and I'm busy.
Real programmers use butterflies
-
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
-
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
Just in case you haven't come across this yet - there's this youtube playlist by Mads Kristensen: https://www.youtube.com/playlist?list=PLReL099Y5nRdG2n1PrY_tbCsUznoYvqkS[^] ...and specifically this item within there which sounds like it might be what you're looking for, if it's detailed enough: Writing Visual Studio Extensions with Mads - Supporting new Languages with TextMate Grammar Files - YouTube[^] I have no personal experience to add, but came across it the other day.
-
Just in case you haven't come across this yet - there's this youtube playlist by Mads Kristensen: https://www.youtube.com/playlist?list=PLReL099Y5nRdG2n1PrY_tbCsUznoYvqkS[^] ...and specifically this item within there which sounds like it might be what you're looking for, if it's detailed enough: Writing Visual Studio Extensions with Mads - Supporting new Languages with TextMate Grammar Files - YouTube[^] I have no personal experience to add, but came across it the other day.
Thanks. I wish they would have written it down instead of making me sit through a video but at this point I'm willing to try it. Thanks again.
Real programmers use butterflies
-
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
I am rather sure, I'll get to write a language server next year. Would something like that help you as well?
-
I am rather sure, I'll get to write a language server next year. Would something like that help you as well?
I'm not sure, but I don't really use that stuff because it ties me to a platform, or I have to do extra work to target others. Using TextMate I should be able to hopefully use the same code to target VS and VS Code so I get my cross platformability. As far as anything beyond that, like other things a language server might provide, I don't really want all that buy in on something with so many moving parts, especially since it's tied to the Microsoft ecosystem.
Real programmers use butterflies
-
I'm not sure, but I don't really use that stuff because it ties me to a platform, or I have to do extra work to target others. Using TextMate I should be able to hopefully use the same code to target VS and VS Code so I get my cross platformability. As far as anything beyond that, like other things a language server might provide, I don't really want all that buy in on something with so many moving parts, especially since it's tied to the Microsoft ecosystem.
Real programmers use butterflies
Langserver.org doesn't read like it's tied to the Microsoft ecosystem too badly. The Delphi IDE, by the way (sold by Embarcadero not affiliated with Microsoft) uses a Delphi language server.
-
Langserver.org doesn't read like it's tied to the Microsoft ecosystem too badly. The Delphi IDE, by the way (sold by Embarcadero not affiliated with Microsoft) uses a Delphi language server.
Thanks. I'll look into it.
Real programmers use butterflies