Skip to content

feat: R syntax highlighting and Notebook Support#1719

Open
Wizzzzzzard wants to merge 56 commits intosassoftware:mainfrom
Wizzzzzzard:feat/procrlang-enablement
Open

feat: R syntax highlighting and Notebook Support#1719
Wizzzzzzard wants to merge 56 commits intosassoftware:mainfrom
Wizzzzzzard:feat/procrlang-enablement

Conversation

@Wizzzzzzard
Copy link
Member

@Wizzzzzzard Wizzzzzzard commented Dec 4, 2025

Summary:
This PR adds initial support for the R language (via PROC R), equivalent to the existing support for Python (PROC PYTHON) and Lua (PROC LUA).

Addresses #1572

Testing:

  • Lexer Tests: Verified PROC R code zones are properly detected (4 passing tests)
  • Client Tests: Verified R code wrapping and notebook cell handling (146 passing tests)
  • Formatter Tests: Verified R code preservation in formatter expected outputs
  • Manual Testing:
    • Created R code cells in SAS Notebooks
    • Exported notebooks to SAS and verified PROC R generation
    • Exported notebooks to HTML and verified R syntax highlighting
    • Tested formatter preserves R code formatting

TODOs:

  • Add R language support to lexer/parser
  • Add R support to SAS Notebooks (cells, export)
  • Add R syntax highlighting via embeddedLanguages
  • Add formatter preservation for R code blocks
  • Add test coverage (server and client)
  • Update documentation (README, website docs, CHANGELOG)
  • Verify backward compatibility with existing notebooks
  • Test all export formats (SAS, HTML)

Future Enhancements (Not in this PR):

  • R Language Server integration for IntelliSense (autocomplete, hover, diagnostics) - similar to Pyright for Python
    • Note: This would be moderately complex to implement as most R language servers require the R runtime environment, making browser support challenging

…rd@users.noreply.github.com>

I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 416922d
I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 74a5d31
I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 0231587
I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 8f22394
I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 97489e5
I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 696bddd

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
…rd@users.noreply.github.com>

I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 29dfd9a
I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 0e2b746
I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 398c156

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
DCO Remediation Commit for Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>

I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 454a6ab

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
DCO Remediation Commit for Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>

I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: c5f8f7f

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
@Wizzzzzzard Wizzzzzzard changed the title initial commit of proc_r embedded lang test feat: R syntax highlighting and Notebook Support Dec 5, 2025
Copy link
Contributor

@scottdover scottdover left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few minor comments

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
@Wizzzzzzard Wizzzzzzard marked this pull request as ready for review December 5, 2025 15:45
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
… tooltips in the sas-lsp-server package

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
…er than defaulting to python

DCO Remediation Commit for Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>

I, Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 32920df

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
…on procedure context

Previously, getCompleteItemHelp() hardcoded "PYTHON" when fetching documentation
for ENDSUBMIT and ENDINTERACTIVE keywords, causing incorrect PYTHON docs to display when these keywords were used in PROC R contexts.

Signed-off-by: Elijah Cúchulainn Reid <56865341+Wizzzzzzard@users.noreply.github.com>
Copy link
Contributor

@scottdover scottdover left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this generally looks okay to me. @smorrisj, do you mind taking a look at this one too? My knowledge of this area of code is limited.

@dahils dahils added testing Test the pull requests testing-complete Complete the pull requests testing and removed verification-needed testing Test the pull requests labels Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing-complete Complete the pull requests testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants