Skip to content

Commit

Permalink
Enable LSP in `.Rprofile (#4569)
Browse files Browse the repository at this point in the history
Addresses #2887 pretty much exactly how @DavisVaughan outlined

### QA Notes

You can bring up your own personal `.Rprofile` via
`usethis::edit_r_profile()`. Before this PR, there were no features
provided by the LSP such as completions, but with this PR we do see LSP
features such as completions. You can try typing `libr` and then using
<kbd>Tab</kbd> to see the difference.
  • Loading branch information
juliasilge authored Sep 4, 2024
1 parent ffbcbce commit a5dd049
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions extensions/positron-r/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
"extensions": [
".R",
".r",
".Rprofile",
".rprofile"
],
"aliases": [
Expand Down
1 change: 1 addition & 0 deletions extensions/positron-r/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const R_DOCUMENT_SELECTORS = [
{ language: 'r', scheme: 'untitled' },
{ language: 'r', scheme: 'inmemory' }, // Console
{ language: 'r', pattern: '**/*.{r,R}' },
{ language: 'r', pattern: '**/*.{rprofile,Rprofile}' },
{ language: 'r', pattern: '**/*.{qmd,Qmd}' },
{ language: 'r', pattern: '**/*.{rmd,Rmd}' },
];
Expand Down

0 comments on commit a5dd049

Please sign in to comment.