Skip to content

Commit 18fbd54

Browse files
committed
Document R language support features
Signed-off-by: Elijah Cúchulainn Reid <[email protected]>
1 parent 43ce626 commit 18fbd54

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,21 @@ The SAS extension includes many [features](https://sassoftware.github.io/vscode-
1010

1111
- SAS syntax highlighting and help, code completion, and code snippets
1212
- Navigate SAS Content and libraries, including table viewer
13-
- Create notebooks for SAS, SQL, Python, R, and other languages
13+
- Create notebooks for SAS, SQL, Python, R, Julia, and other languages
1414

1515
<img src="website/static/images/featuresGlance.png"/>
1616

17+
## Language Support
18+
19+
The SAS extension provides enhanced language support for embedded languages in SAS notebooks and code files:
20+
21+
- **Python**: Full IntelliSense support (code completion, hover, signature help) is included via Pyright
22+
- **R**:
23+
- **In VS Code Desktop**: Basic IntelliSense support (code completion, hover) for common R functions - no installation required
24+
- **In Browser (VS Code for Web)**: Basic IntelliSense support provided automatically via WebR (no installation required)
25+
- **Julia**: Syntax highlighting and execution via PROC JULIA
26+
- **SQL** and **Lua**: Syntax highlighting and execution support
27+
1728
## Support
1829

1930
### SAS Communities

website/docs/Features/sasNotebook.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@ Starting with Visual Studio Code version 1.93, [the language for SQL files has b
1919

2020
:::
2121

22+
## Language Support for Embedded Code
23+
24+
SAS Notebook supports multiple languages including Python, R, SQL, and Lua. When working with these languages in SAS notebooks, enhanced language features such as code completion, hover information, and signature help are available.
25+
26+
### Python Language Features
27+
28+
Python code cells benefit from integrated IntelliSense powered by Pyright, which is included with the extension. No additional setup is required for Python language features.
29+
30+
### R Language Features
31+
32+
R code cells include basic IntelliSense features (code completion and hover documentation) for common R functions:
33+
34+
- **In VS Code Desktop**: Basic code completion and hover information for common R functions is provided automatically - no installation required
35+
- **In Browser (VS Code for Web)**: Enhanced R language features are automatically available via WebR - no installation required! WebR provides basic code completion and hover information for common R functions.
36+
37+
Note: R code execution via PROC RLANG requires a SAS connection, but the language features work independently.
38+
2239
## Export
2340

2441
To export your SAS Notebook to other formats, click the **More Actions** (`...`) button on the notebook toolbar at top, and select `Export`. The following formats are supported.

website/docs/faq.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,36 @@ If the options on the Problems panel toolbar are not visible, you can display th
107107
### Can I control whether errors and warnings from my SAS log are displayed in the Problems panel?
108108

109109
Yes. The `SAS.problems.log` setting controls whether problems from the SAS log are displayed in the Problems panel. This option is enabled by default. To access this option, select `File > Preferences > Settings`, and search for "sas problems".
110+
111+
## Language Server questions
112+
113+
### Why don't I see code completion or hover information in my PROC RLANG code?
114+
115+
**In VS Code Desktop**: Basic R language features (code completion and hover) are provided automatically for common R functions - no installation required. If you're not seeing them:
116+
117+
1. Make sure you're inside a `PROC RLANG` submit block
118+
2. Check that your cursor is positioned on R code (not SAS code)
119+
3. Try restarting VS Code if features don't appear
120+
121+
**In Browser (VS Code for Web)**: R language features are automatically available via WebR. If you don't see completions:
122+
123+
```r
124+
1. WebR may still be initializing - wait a few moments after opening the file
125+
2. Check the console log (`Help > Toggle Developer Tools`) for WebR initialization messages
126+
3. Refresh the page if features don\'t appear after waiting
127+
128+
### How can I verify that R language features are working?
129+
130+
**In VS Code Desktop**:
131+
1. Open a SAS file with a PROC RLANG submit block
132+
2. Type common R functions like `mean`, `sum`, `print`, or `paste` inside the submit block
133+
3. You should see autocomplete suggestions as you type
134+
4. Hover over these function names - you should see documentation
135+
136+
If features don\'t work, check the VS Code console log (`Help > Toggle Developer Tools`) for errors.
137+
138+
**In Browser (VS Code for Web)**:
139+
1. Open a SAS file with a PROC RLANG block
140+
2. Check the console log (`Help > Toggle Developer Tools`) for messages like "WebR initialized successfully"
141+
3. Try typing common R functions like `mean`, `sum`, or `plot` - you should see autocomplete suggestions
142+
```

0 commit comments

Comments
 (0)