Replies: 1 comment 1 reply
-
Hi Steven. I've moved your issue because there is a place for feature requests, so I don't completely forget about them. First a look at how Print works. Ignoring how print sessions are managed, at some point a print session decides to render a file (or editor buffer). There are various document renderers, the default being the source code renderer. This is the one that does syntax colouring and line numbers. There's another one for Markdown and one for plaintext (no line numbers or colouring). Renderers are selected according to the content language as determined by vscode. Usually, the problem is improper language identification but, in your case, there is a definite language identifier I probably can inhibit syntax colouring. If I don't process the content with highlightjs I'll have to HTML encode it. Currently this is a side effect of the syntax colouring step, but I could do it directly. This is a straightforward change, but it affects a lot of code. What can you do in the meantime? You could fork the repo and create your own custom build with a "No syntax colouring" stylesheet that doesn't define any of the syntax classes. If I were to do that, I would get a bad review within ten minutes of release from someone who thinks having to change stylesheets is the worst thing ever. Adding a way to assign stylesheets to languages would solve this and it's not a bad idea but it's yet another backlog item. And the people who do the most complaining about small things are also the last people to RTFM, so they'd never learn about that feature. But enough grumbling about minority users. Adding a way to suppress syntax colouring by not using highlightjs really needs to be per-language too, so maybe it would be better to support the null stylesheet and the language association. That addresses no-colouring as a special case of stylesheet per language. What are your thoughts on these options? |
Beta Was this translation helpful? Give feedback.
-
Hi, @PeterWone. I apologize for bringing this up again.
I have to print numerous .log files. However, the color coding in these files is unpredictable because different programs generate them differently. I am currently using the solution mentioned in #167 (comment). Unfortunately, it is quite cumbersome to perform this task every time. Additionally, if I select "plain text", the line numbers will be omitted in the PDFs.
I was wondering if you could please consider adding a command to print the files without the color theme. This way, users would have the flexibility to choose how they want to print their files on the fly.
Beta Was this translation helpful? Give feedback.
All reactions