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

RStudio Theme Wishlist #19

Open
gadenbuie opened this issue Mar 10, 2020 · 2 comments
Open

RStudio Theme Wishlist #19

gadenbuie opened this issue Mar 10, 2020 · 2 comments
Labels
priority: low Low priority

Comments

@gadenbuie
Copy link
Owner

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

@gadenbuie gadenbuie added the priority: low Low priority label Mar 10, 2020
@gadenbuie
Copy link
Owner Author

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)
```
<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
Copy link
Owner Author

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>

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

No branches or pull requests

1 participant