Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Activate extension when a R script file is opened outside of a workspace

クローズ
#1,624 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
r, typescript, vscode

調査の方向性

package.json を開き、既存の workspaceContains、command、webview エントリから始めて activationEvents 配列を調べます。スタンドアロンの R スクリプトで拡張機能が起動するように R 言語のアクティベーションを追加し、その後、ワークスペース外で R ファイルを開いたときに拡張機能の機能が有効になることを確認します。

索引モデルが issue の本文から書いたものです。

説明

feature-request

Is your feature request related to a problem? Please describe.

I often use the vscode-R extension without opening a workspace. Currently, the vscode-R extension is activated when a workspace containing R scripts is opened. The extension does not activate when opening a single R script file outside of a workspace. This means that I have to force the extension to activate so that I can have the autocomplete and popup help features working. I force the extension to activate by opening the R Help feature which I think works due to the onWebviewPanel:rhelp activation event.

Describe the solution you'd like

The following patch to the package.json file activates the extension when an R script file is opened outside of a workspace folder. Having the onLanguage:r line is consistent with other extensions, namely the Python and C/C++ extensions from Microsoft.

--- package.json.orig	2025-07-04 08:48:57.676941500 -0500
+++ package.json	2025-07-04 08:51:26.174039600 -0500
@@ -31,7 +31,8 @@
 	"activationEvents": [
 		"workspaceContains:**/*.{rproj,Rproj,r,R,rd,Rd,rmd,Rmd}",
 		"onCommand:r.runSelectionInActiveTerm",
-		"onWebviewPanel:rhelp"
+		"onWebviewPanel:rhelp",
+		"onLanguage:r"
 	],
 	"main": "./dist/extension",
 	"contributes": {

Describe alternatives you've considered

Force the vscode-R extension to activate by opening the R Help feature in the extension. Not ideal as it involves an extra step. The above patch makes the extension available seamlessly when working outside of vscode workspaces.

Additional context

主要言語
TypeScript
スター
1.2k
フォーク
139
平均マージ
22時間
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

REditorSupport/vscode-R のほかの issue

REditorSupport/vscode-R の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。