gadenbuie / rsthemes

🔮 Full RStudio IDE and Syntax Themes
https://www.garrickadenbuie.com/project/rsthemes/
Other
599 stars 45 forks source link

RStudio Theme Wishlist #19

Open gadenbuie opened 4 years ago

gadenbuie commented 4 years ago

A running list of a few things I wish were easier to theme, as I encounter them.

gadenbuie commented 4 years ago

Rmd: Inline vs Standard Code Chunk

In R Markdown inline code is indistinguishable from a standard markdown code chunk. Both are classed .ace_support.ace_function.

Note that the `echo = FALSE` parameter was added to the code chunk...
<div class="ace_line" style="height:19px">
  Note that the
  <span class="ace_support ace_function">`</span>
  <span class="ace_support ace_function">echo&nbsp;=&nbsp;FALSE</span>
  <span class="ace_support ace_function">`</span>
  parameter was added to the code chunk...
</div>
```r
library(ggplot2)

```html
<div class="ace_line_group" style="height:19px">
  <div class="ace_line" style="height:19px">
    <span class="ace_support ace_function">```r</span>
  </div>
</div>
<div class="ace_line_group" style="height:19px">
  <div class="ace_line" style="height:19px">
    <span class="ace_support ace_function">library(ggplot2)</span>
  </div>
</div>
<div class="ace_line_group" style="height:19px">
  <div class="ace_line" style="height:19px">
    <span class="ace_support ace_function">```</span>
  </div>
</div>
gadenbuie commented 4 years ago

Variable Assignment and Function Formals vs Variables

I would love to be able to style a variables when it's being assigned, i.e. add in the example below.

I would also like to be able to distinguish between function formals and variables in use, e.g. to differentiate between x and y in the add function definition, the x and y in the function call add(x = 1, y = 2), and the x and y in use as variables inside the add() definition.

add <- function(x, y) {
  x + y
}
add(x = 1, y = 2)
<div class="ace_line" style="height:19px">
  <span class="ace_identifier">add</span>&nbsp;  <!-- Variable in assignment -->
  <span class="ace_keyword ace_operator">&lt;-</span>&nbsp;
  <span class="ace_keyword">function</span>
  <span class="ace_paren ace_keyword ace_operator">(</span>
  <span class="ace_identifier">x</span>         <!-- function formal -->
  <span class="ace_punctuation ace_keyword ace_operator">,</span>&nbsp;
  <span class="ace_identifier">y</span>
  <span class="ace_paren ace_keyword ace_operator">)</span>&nbsp;
  <span class="ace_paren ace_keyword ace_operator">{</span>
</div>
<div class="ace_line" style="height:19px">
  &nbsp;&nbsp;
  <span class="ace_identifier">x</span>&nbsp;   <!-- variable in use -->
  <span class="ace_keyword ace_operator">+</span>&nbsp;
  <span class="ace_identifier">y</span>
</div>
<div class="ace_line" style="height:19px">
  <span class="ace_paren ace_keyword ace_operator">}</span>
</div>
<div class="ace_line" style="height:19px">
  <span class="ace_identifier ace_support ace_function">add</span>
  <span class="ace_paren ace_keyword ace_operator">(</span>
  <span class="ace_identifier">x</span>&nbsp;  <!-- function argument -->
  <span class="ace_keyword ace_operator">=</span>&nbsp;
  <span class="ace_constant ace_numeric">1</span>
  <span class="ace_punctuation ace_keyword ace_operator">,</span>&nbsp;
  <span class="ace_identifier">y</span>&nbsp;
  <span class="ace_keyword ace_operator">=</span>&nbsp;
  <span class="ace_constant ace_numeric">2</span>
  <span class="ace_paren ace_keyword ace_operator">)</span>
</div>