Activate extension when a R script file is opened outside of a workspace
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- r, typescript, vscode
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Mở package.json và kiểm tra mảng activationEvents, bắt đầu với các mục workspaceContains, command và webview hiện có. Thêm kích hoạt cho ngôn ngữ R để một tập lệnh R độc lập khởi động extension, sau đó xác minh rằng việc mở một tệp R bên ngoài workspace sẽ bật các tính năng của extension.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 139
- Merge trung bình
- 16 giờ 16 phút
- Pull request đã merge (30 ngày)
- 11
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của REditorSupport/vscode-R
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
REditorSupport/vscode-R#1687 · 4 bình luận · 3 reaction ·
-
feature-request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
REditorSupport/vscode-R#1763 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
REditorSupport/vscode-R#1756 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
REditorSupport/vscode-R#1755 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
REditorSupport/vscode-R#1751 · 1 bình luận ·
Tất cả issue của REditorSupport/vscode-R
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
motiondivision/motion#3849 ·
-
Add: S Play Event HD Đang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Improvement for contact popover Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
LiteLLM proxy response_cost (x-litellm-response-cost) is never applied to ChatModelOutput.cost Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
i-am-bee/beeai-framework#1697 · 1 reaction ·
-
Support bun dedupe Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
antfu/node-modules-inspector#214 ·