From 02d908bfdd376343419d6a7169724490ba67a775 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Tue, 15 Oct 2024 12:26:43 +0900 Subject: [PATCH 1/3] Add formatOnType and insertSpaces settings for better learning environment --- .devcontainer/devcontainer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 870677e..c472c64 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -55,7 +55,9 @@ //"ruby.lint": { "rubocop": true }, //"ruby.intellisense": "rubyLocate", "editor.tabSize": 2, - "editor.formatOnSave": false, + "editor.formatOnSave": false, // Disable onSave to show diff edited by learners only + "editor.formatOnType": false, // Disable onType for the same reason above + "editor.insertSpaces": true, // Use spaces, not tabs, to avoid errors for learners "editor.renderWhitespace": "none", "[ruby]": { "editor.defaultFormatter": "castwide.solargraph" From c16a19ec32cf37d5c5397c2c5a000471ea8797a4 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Tue, 15 Oct 2024 12:33:17 +0900 Subject: [PATCH 2/3] Use spaces for indentation in JSON file --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c472c64..769277a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -56,8 +56,8 @@ //"ruby.intellisense": "rubyLocate", "editor.tabSize": 2, "editor.formatOnSave": false, // Disable onSave to show diff edited by learners only - "editor.formatOnType": false, // Disable onType for the same reason above - "editor.insertSpaces": true, // Use spaces, not tabs, to avoid errors for learners + "editor.formatOnType": false, // Disable onType for the same reason above + "editor.insertSpaces": true, // Use spaces, not tabs, to avoid errors for learners "editor.renderWhitespace": "none", "[ruby]": { "editor.defaultFormatter": "castwide.solargraph" From 00445b27e10289f310effc68f74d23ee3c57e16d Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Tue, 15 Oct 2024 12:35:24 +0900 Subject: [PATCH 3/3] Enable semantic highlighting by Ruby LSP --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 769277a..4519b6b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -60,7 +60,8 @@ "editor.insertSpaces": true, // Use spaces, not tabs, to avoid errors for learners "editor.renderWhitespace": "none", "[ruby]": { - "editor.defaultFormatter": "castwide.solargraph" + "editor.defaultFormatter": "castwide.solargraph", + "editor.semanticHighlighting.enabled": true, // Enable semantic highlighting }, "files.associations": { "*.erb": "erb" }, "emmet.includeLanguages": { "erb": "html" },