You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add rainbow colors and highlighting for markdown files in the source editor #7793
@mikebessuille Rainbow parens show up in visual mode for Markdown files, so the source and visual mode are inconsistent. Should they be disabled in visual mode?
Code in markdown files is indeed executed so needs to have identical behavior as source mode.
I can't quite follow what the defect is here (i.e. what is inconsistent). If rainbow parens are enabled they should show up in both source and visual mode (and conversely not show up when disabled).
@jmcphers Can we see what's going on here? I still don't understand from the bug description what the setting actually is when you observe this behavior. This seems like it would be a P0 bug for preview (so I'll target it there for now) if rainbow parens were always displayed in visual mode no matter what the setting).
Right. So, then it comes back to what I said earlier on this ticket. This is not a regression; this never worked in source mode for Markdown files. So... this wouldn't meet my bar at this point in the release for 1.4. In my opinion. Anyone else feel strongly that it needs to be fixed urgently?
The current state, in 1.4, has an inconsistency in markdown:
- Highlighting and rainbow parens are present in visual mode.
- Highlighting and rainbow parens are not present in source mode.
Are we OK with this current state in 1.4? I say yes. If anyone disagrees, please say so.
changed the title [-]Rainbow colors and themes show up for Markdown files in visual mode but not source mode[/-][+]Add rainbow colors and themes show up for markdown files in the source editor[/+]on Oct 5, 2020
changed the title [-]Add rainbow colors and themes show up for markdown files in the source editor[/-][+]Add rainbow colors and themes for markdown files in the source editor[/+]on Oct 5, 2020
changed the title [-]Add rainbow colors and themes for markdown files in the source editor[/-][+]Add rainbow colors and highlighting for markdown files in the source editor[/+]on Oct 5, 2020
Activity
mikebessuille commentedon Sep 21, 2020
rainbow parens is not meant for publishing, so we do not expect this to work in a Markdown file where the code is not being edited for execution.
ronblum commentedon Sep 21, 2020
@mikebessuille Rainbow parens show up in visual mode for Markdown files, so the source and visual mode are inconsistent. Should they be disabled in visual mode?
mikebessuille commentedon Sep 21, 2020
in that case, perhaps they should be disabled in Visual Mode, not sure. Yes I think they should be consistent between visual mode and "regular mode".
jjallaire commentedon Sep 21, 2020
Code in markdown files is indeed executed so needs to have identical behavior as source mode.
I can't quite follow what the defect is here (i.e. what is inconsistent). If rainbow parens are enabled they should show up in both source and visual mode (and conversely not show up when disabled).
ronblum commentedon Sep 21, 2020
The difference is that all parens remain a single color in source mode, but in rainbow colors in visual mode. E.g.
is monochromatic in source mode:

but in rainbow colors in visual mode:

This is only true for Markdown. R Markdown is consistently rainbows.
jjallaire commentedon Sep 21, 2020
@jmcphers Can we see what's going on here? I still don't understand from the bug description what the setting actually is when you observe this behavior. This seems like it would be a P0 bug for preview (so I'll target it there for now) if rainbow parens were always displayed in visual mode no matter what the setting).
16 remaining items
mikebessuille commentedon Oct 2, 2020
Right. So, then it comes back to what I said earlier on this ticket. This is not a regression; this never worked in source mode for Markdown files. So... this wouldn't meet my bar at this point in the release for 1.4. In my opinion. Anyone else feel strongly that it needs to be fixed urgently?
kevinushey commentedon Oct 2, 2020
We've considered highlighting plain Markdown files as though they were R Markdown files in the past, but ultimately never decided to make that change.
FWIW, users can manually change the filetype using the file type menu at the bottom right of the editor viewport.
ronblum commentedon Oct 5, 2020
The current state, in 1.4, has an inconsistency in markdown:
- Highlighting and rainbow parens are present in visual mode.
- Highlighting and rainbow parens are not present in source mode.
Are we OK with this current state in 1.4? I say yes. If anyone disagrees, please say so.
[-]Rainbow colors and themes show up for Markdown files in visual mode but not source mode[/-][+]Add rainbow colors and themes show up for markdown files in the source editor[/+][-]Add rainbow colors and themes show up for markdown files in the source editor[/-][+]Add rainbow colors and themes for markdown files in the source editor[/+][-]Add rainbow colors and themes for markdown files in the source editor[/-][+]Add rainbow colors and highlighting for markdown files in the source editor[/+]kevinushey commentedon Oct 5, 2020
Given that this only affects plain Markdown documents (and not R Markdown documents) I think it's okay to leave out of v1.4.