Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: console or terminal syntax highlighter #330

Open
spkane opened this issue Jul 19, 2024 · 1 comment
Open

Feature Request: console or terminal syntax highlighter #330

spkane opened this issue Jul 19, 2024 · 1 comment

Comments

@spkane
Copy link

spkane commented Jul 19, 2024

I have come across syntax highlighters in the past that have a concept of a console highlighter, which is different from things like bash and powershell and is designed to be a bit more aware of the prompt, and the fact that the block, is likely one of more commands at a prompt followed by output that is very likely pseudo-plain text, versus any parse-able programming language.

It would be nice to have something like this.

Ideally, it would detect common prompts at the start of the line like $, #, C:\, and PS \> (or whatever the Windows ones are), parse the command in a reasonable fashion highlighting various standard arg types and their values, and then treating the output as more standard text output. It would be great if there were some way to tell it what the output was (or if it could try to make a reasonable guess), but that might be wishful thinking on my part. :-)


Also, this is a really great plugin. I am very excited to have found it in my searches and was more than happy to buy the theme pack and advanced features!

@KevinBatdorf
Copy link
Owner

Thanks for this feedback. The way the engine works is it uses TextMate grammars in the same way VS Code does, so there would have to be an existing grammar for it. I'm guessing this is too unique of an experience for there to be an existing solution though since this is specific to presentation on a blog.

I do like the idea though in general, but it almost could be it's own plugin too since the features are unique to that experience only. I have thought about adding a more general "output" section (maybe even with compiled/rendered output) that could sit under the code, but I'm not sure when I'll be able to work on that, or if that would even fit here how you're imaging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants