conflr icon indicating copy to clipboard operation
conflr copied to clipboard

Syntax highlighting in Code Block macro?

Open AlexisMaizel opened this issue 4 years ago • 3 comments

Super nice and useful add on. Thanks. R code blocks are at the moment converted to Code Block macro but do not have any syntax highlighting at all.
Could conflr either use:

  • the default syntax highlighting of the host Confluence 'CodeBlock' macro?
  • a user defined default value (e.g. one of the ones currently supported see: https://confluence.atlassian.com/doc/code-block-macro-139390.html) ?

AlexisMaizel avatar Dec 16 '20 09:12 AlexisMaizel

If your Confluence already provides custom syntax highlighting for R, you can specify r in conflr_supported_syntax_highlighting option (c.f. https://line.github.io/conflr/#options). But, I agree it might be useful to set the default highlighting language, even if it's not for R. Just curious, which language do you specify when you write R code on code block macro?

yutannihilation avatar Dec 16 '20 14:12 yutannihilation

oh, I overlooked the existence of the conflr package (only used the RStudio add on so far). I read the doc, installed it and indeed it does all I want. Thanks! None of the language syntax highlighting offered in the code block macro is really suited to R, but I use python.

AlexisMaizel avatar Dec 16 '20 20:12 AlexisMaizel

Ah, yes, probably I need to add more documents about console usages... Sorry for your confusion!

yutannihilation avatar Dec 19 '20 11:12 yutannihilation