Don't print folded code #286
Replies: 1 comment
-
That's because it prints documents, and the folding state of the edit buffer does not exist in the document. That said, vscode does seem to remember folding state on a per document basis. I don't know where this information is persisted. If you were to create a virtual document that excludes folded lines you'd be halfway there, but your line numbers would be out. It's not a trivial problem, which is why even though this was an early issue I raised myself, I closed it as too much work for the result. Of course, if someone else wants it enough to solve all the problems and submit a PR I absolutely will incorporate it. There is some documentation on folding but it's about how a language server can tell vscode where folding points are. There's no way to ask the editor for this information. This is a common theme with vscode - they're all about extensions giving info to vscode, with no consideration of providing info to extensions. |
Beta Was this translation helpful? Give feedback.
-
As you know VScode allows folding: https://code.visualstudio.com/docs/editor/codebasics#_folding
It'd be really nice to use this feature while printing as well.
Currently it seems it ignores the foldedness and just prints everything.
Great extension BTW!
Beta Was this translation helpful? Give feedback.
All reactions