Skip to content

Commit baeb5a4

Browse files
committed
docs: update VS Code extension settings to match actual implementation
- Fix extension ID: type-ruby.t-ruby-vscode -> t-ruby.t-ruby - Update settings keys to actual ones (lspPath, enableLSP, diagnostics.enable, completion.enable) - Add Commands section documenting available commands - Add .d.trb file support in features - Add tip explaining trbconfig.yml vs VS Code settings relationship - Remove non-existent settings (inlayHints, format.onSave, compile.onSave, etc.)
1 parent d899264 commit baeb5a4

File tree

3 files changed

+72
-57
lines changed

3 files changed

+72
-57
lines changed

docs/getting-started/editor-setup.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,51 @@ VS Code offers the most complete T-Ruby development experience.
2525
Or install from the command line:
2626

2727
```bash
28-
code --install-extension type-ruby.t-ruby-vscode
28+
code --install-extension t-ruby.t-ruby
2929
```
3030

3131
### Features
3232

3333
The VS Code extension provides:
3434

35-
- **Syntax highlighting** for `.trb` files
36-
- **Type error highlighting** as you type
35+
- **Syntax highlighting** for `.trb` and `.d.trb` files
36+
- **Real-time diagnostics** - type errors as you type
3737
- **Autocomplete** with type information
3838
- **Hover information** showing types
3939
- **Go to definition** for functions and classes
40-
- **Format on save** (optional)
4140

42-
### Configuration
41+
### Commands
4342

44-
Add to your VS Code settings (`settings.json`):
43+
The extension provides the following commands (accessible via Command Palette):
4544

46-
```json title=".vscode/settings.json"
47-
{
48-
// Enable type checking as you type
49-
"t-ruby.typeCheck.enabled": true,
45+
- **T-Ruby: Compile Current File** - Compile the active `.trb` file
46+
- **T-Ruby: Generate Declaration File** - Generate `.d.trb` declaration file
47+
- **T-Ruby: Restart Language Server** - Restart the LSP server
5048

51-
// Show type hints inline
52-
"t-ruby.inlayHints.enabled": true,
49+
### Configuration
5350

54-
// Format .trb files on save
55-
"t-ruby.format.onSave": true,
51+
The extension reads project settings from `trbconfig.yml` in your project root. Editor-specific settings can be configured in VS Code settings (`settings.json`):
5652

53+
```json title=".vscode/settings.json"
54+
{
5755
// Path to trc compiler (if not in PATH)
58-
"t-ruby.compilerPath": "/usr/local/bin/trc",
56+
"t-ruby.lspPath": "trc",
5957

60-
// Compile on save
61-
"t-ruby.compile.onSave": true,
58+
// Enable Language Server Protocol support
59+
"t-ruby.enableLSP": true,
6260

63-
// Output directory
64-
"t-ruby.compile.outputDir": "build"
61+
// Enable real-time diagnostics
62+
"t-ruby.diagnostics.enable": true,
63+
64+
// Enable autocomplete suggestions
65+
"t-ruby.completion.enable": true
6566
}
6667
```
6768

69+
:::tip
70+
Compile options like output directory and strictness level should be configured in [`trbconfig.yml`](/docs/getting-started/project-configuration), not in VS Code settings. This ensures consistent behavior across all editors and CI/CD pipelines.
71+
:::
72+
6873
### Recommended Extensions
6974

7075
For the best Ruby/T-Ruby experience, also install:

i18n/ja/docusaurus-plugin-content-docs/current/getting-started/editor-setup.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,51 @@ VS Codeは最も完全なT-Ruby開発体験を提供します。
2525
またはコマンドラインからインストール:
2626

2727
```bash
28-
code --install-extension type-ruby.t-ruby-vscode
28+
code --install-extension t-ruby.t-ruby
2929
```
3030

3131
### 機能
3232

3333
VS Code拡張機能が提供するもの:
3434

35-
- `.trb`ファイルの**シンタックスハイライト**
36-
- 入力中の**型エラーハイライト**
35+
- `.trb`および`.d.trb`ファイルの**シンタックスハイライト**
36+
- **リアルタイム診断** - 入力中に型エラーを表示
3737
- 型情報付き**オートコンプリート**
3838
- 型を表示する**ホバー情報**
3939
- 関数とクラスの**定義へジャンプ**
40-
- **保存時フォーマット**(オプション)
4140

42-
### 設定
41+
### コマンド
4342

44-
VS Code設定(`settings.json`)に追加
43+
拡張機能が提供するコマンド(コマンドパレットからアクセス可能)
4544

46-
```json title=".vscode/settings.json"
47-
{
48-
// 入力中の型チェックを有効化
49-
"t-ruby.typeCheck.enabled": true,
45+
- **T-Ruby: Compile Current File** - 現在の`.trb`ファイルをコンパイル
46+
- **T-Ruby: Generate Declaration File** - `.d.trb`宣言ファイルを生成
47+
- **T-Ruby: Restart Language Server** - LSPサーバーを再起動
5048

51-
// インライン型ヒントを表示
52-
"t-ruby.inlayHints.enabled": true,
49+
### 設定
5350

54-
// 保存時に.trbファイルをフォーマット
55-
"t-ruby.format.onSave": true,
51+
拡張機能はプロジェクトルートの`trbconfig.yml`からプロジェクト設定を読み込みます。エディタ固有の設定はVS Code設定(`settings.json`)で構成できます:
5652

53+
```json title=".vscode/settings.json"
54+
{
5755
// trcコンパイラのパス(PATHにない場合)
58-
"t-ruby.compilerPath": "/usr/local/bin/trc",
56+
"t-ruby.lspPath": "trc",
5957

60-
// 保存時にコンパイル
61-
"t-ruby.compile.onSave": true,
58+
// Language Server Protocolサポートを有効化
59+
"t-ruby.enableLSP": true,
6260

63-
// 出力ディレクトリ
64-
"t-ruby.compile.outputDir": "build"
61+
// リアルタイム診断を有効化
62+
"t-ruby.diagnostics.enable": true,
63+
64+
// オートコンプリート候補を有効化
65+
"t-ruby.completion.enable": true
6566
}
6667
```
6768

69+
:::tip
70+
出力ディレクトリや厳格度レベルなどのコンパイルオプションは、VS Code設定ではなく[`trbconfig.yml`](/docs/getting-started/project-configuration)で構成してください。これにより、すべてのエディタとCI/CDパイプラインで一貫した動作が保証されます。
71+
:::
72+
6873
### 推奨拡張機能
6974

7075
最高のRuby/T-Ruby体験のために、以下もインストール:

i18n/ko/docusaurus-plugin-content-docs/current/getting-started/editor-setup.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,51 @@ VS Code는 가장 완벽한 T-Ruby 개발 경험을 제공합니다.
2525
또는 명령줄에서 설치:
2626

2727
```bash
28-
code --install-extension type-ruby.t-ruby-vscode
28+
code --install-extension t-ruby.t-ruby
2929
```
3030

3131
### 기능
3232

3333
VS Code 확장이 제공하는 것들:
3434

35-
- `.trb` 파일의 **구문 강조**
36-
- 입력 중 **타입 오류 강조**
35+
- `.trb` `.d.trb` 파일의 **구문 강조**
36+
- **실시간 진단** - 입력 중 타입 오류 표시
3737
- 타입 정보가 있는 **자동완성**
3838
- 타입을 보여주는 **호버 정보**
3939
- 함수와 클래스의 **정의로 이동**
40-
- **저장 시 포맷** (선택 사항)
4140

42-
### 구성
41+
### 명령어
4342

44-
VS Code 설정(`settings.json`)에 추가:
43+
확장이 제공하는 명령어 (명령 팔레트에서 접근 가능):
4544

46-
```json title=".vscode/settings.json"
47-
{
48-
// 입력 중 타입 검사 활성화
49-
"t-ruby.typeCheck.enabled": true,
45+
- **T-Ruby: Compile Current File** - 현재 `.trb` 파일 컴파일
46+
- **T-Ruby: Generate Declaration File** - `.d.trb` 선언 파일 생성
47+
- **T-Ruby: Restart Language Server** - LSP 서버 재시작
5048

51-
// 인라인 타입 힌트 표시
52-
"t-ruby.inlayHints.enabled": true,
49+
### 구성
5350

54-
// 저장 시 .trb 파일 포맷
55-
"t-ruby.format.onSave": true,
51+
확장은 프로젝트 루트의 `trbconfig.yml`에서 프로젝트 설정을 읽습니다. 에디터 전용 설정은 VS Code 설정(`settings.json`)에서 구성할 수 있습니다:
5652

53+
```json title=".vscode/settings.json"
54+
{
5755
// trc 컴파일러 경로 (PATH에 없는 경우)
58-
"t-ruby.compilerPath": "/usr/local/bin/trc",
56+
"t-ruby.lspPath": "trc",
5957

60-
// 저장 시 컴파일
61-
"t-ruby.compile.onSave": true,
58+
// Language Server Protocol 지원 활성화
59+
"t-ruby.enableLSP": true,
6260

63-
// 출력 디렉토리
64-
"t-ruby.compile.outputDir": "build"
61+
// 실시간 진단 활성화
62+
"t-ruby.diagnostics.enable": true,
63+
64+
// 자동완성 제안 활성화
65+
"t-ruby.completion.enable": true
6566
}
6667
```
6768

69+
:::tip
70+
출력 디렉토리나 엄격도 수준 같은 컴파일 옵션은 VS Code 설정이 아닌 [`trbconfig.yml`](/docs/getting-started/project-configuration)에서 구성해야 합니다. 이렇게 하면 모든 에디터와 CI/CD 파이프라인에서 일관된 동작을 보장합니다.
71+
:::
72+
6873
### 권장 확장
6974

7075
최고의 Ruby/T-Ruby 경험을 위해 다음도 설치하세요:

0 commit comments

Comments
 (0)