REditorSupport / vscode-R

R Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=REditorSupport.r
MIT License
1.08k stars 127 forks source link

Textmate scopes in .Rmd files does not show relevant math scopes (correct math scopes in both .md and .latex files as a comparison) #1309

Open baikaltaiga opened 1 year ago

baikaltaiga commented 1 year ago

Describe the bug

I cannot use user-defined snippets to typeset math in .Rmd files because the math scopes are not correctly reflected in .Rmd files.

In .md files or .qmd files, typesetting using user-defined snippets works smoothly because the math scopes are correctly reflected.

.Rmd files should be consistent with .md and .qmd files in correctly identifying math scopes so that users can use user-defined context-specific math snippets to speed up typesetting math in .Rmd files.

To Reproduce Steps to reproduce the behavior:

  1. open an .Rmd file
  2. type $$ for math typesetting
  3. move the mouse cursor between $$
  4. presss ctrl + shift + p, then select "developer: inspect editor tokens and scopes," inspect the output: for .Rmd files, the "textmate scopes" does not show any math scope

Repeat the same procedure for a .md file or a .qmd file, the math scopes are correctly shown.

Can you fix this issue by yourself? (We appreciate the help)

Not without some guidance.

(If yes,) can we assist you with anything?

If there is a fix that I can accomplish, I would need some help to know what I need to do, because I have searched for a solution for a while but to no avail.

(If applicable) Please attach setting.json

N/A

Expected behavior

the relevant math scopes should be correctly reflected in .Rmd files like in .md and .qmd files

Screenshots

The absence of math scopes in .Rmd files: image

The correctly reflected math scopes in .md files: image

Environment (please complete the following information):

Additional context

N/A

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 365 days with no activity.