You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`t-linter` language server (installed automatically or manually)
26
+
-`t-linter` language server (must be installed via PyPI)
25
27
26
28
## Installation
27
29
28
-
### Option 1: Install from VSCode Marketplace
29
-
1. Open VSCode
30
-
2. Go to Extensions (Ctrl+Shift+X)
31
-
3. Search for "t-linter"
32
-
4. Click Install
30
+
**⚠️ Important**: This extension requires the t-linter language server to be installed separately.
33
31
34
-
### Option 2: Install t-linter manually
32
+
### Step 1: Install the t-linter language server
35
33
```bash
36
34
pip install t-linter
37
35
```
38
36
37
+
### Step 2: Install the VSCode extension
38
+
1. Open VSCode
39
+
2. Go to Extensions (Ctrl+Shift+X)
40
+
3. Search for "t-linter"
41
+
4. Click Install on "T-Linter - Python Template Strings Highlighter & Linter" by koxudaxi
42
+
43
+
### Step 3: Configure server path (if needed)
44
+
If the extension can't find the t-linter binary automatically:
45
+
46
+
1.**Find your t-linter path**:
47
+
```bash
48
+
which t-linter # macOS/Linux
49
+
where t-linter # Windows
50
+
```
51
+
52
+
2.**Set the path in VSCode settings**:
53
+
- Open Settings (Ctrl+, / Cmd+,)
54
+
- Search for `t-linter.serverPath`
55
+
- Enter the full path to your t-linter executable
56
+
57
+
### Optional: PEP 750 Support with Patched Pyright
58
+
59
+
Since PEP 750 template strings (`t"..."`) are not yet supported in the official Pyright extension, you can install a patched version that adds PEP 750 t-string support:
60
+
61
+
1.**Download the patched Pyright extension**:
62
+
- Go to [Patched Pyright Releases](https://github.com/koxudaxi/pyright/releases/tag/untagged-7b5f847f7a434b72a328)
63
+
- Download the `.vsix` file
64
+
65
+
2.**Install the patched extension**:
66
+
- Open VSCode
67
+
- Press `Ctrl+Shift+P` (Cmd+Shift+P on macOS)
68
+
- Type "Extensions: Install from VSIX..."
69
+
- Select the downloaded `.vsix` file
70
+
71
+
3.**Disable the original Pyright extension** (if installed):
72
+
- Go to Extensions tab
73
+
- Find "Pyright" and click "Disable"
74
+
75
+
This patched version enables Pyright to recognize and type-check PEP 750 template strings, providing better integration with t-linter for comprehensive template string analysis.
76
+
39
77
## Usage
40
78
41
79
### Basic Example
@@ -101,19 +139,34 @@ This extension contributes the following commands:
101
139
## Troubleshooting
102
140
103
141
### Language server not found
104
-
If you see "t-linter binary not found", install it using:
105
-
```bash
106
-
pip install t-linter
107
-
```
142
+
If you see "t-linter binary not found":
143
+
144
+
1.**Ensure t-linter is installed**:
145
+
```bash
146
+
pip install t-linter
147
+
```
148
+
149
+
2.**Verify installation**:
150
+
```bash
151
+
t-linter --version
152
+
```
153
+
154
+
3.**Configure server path manually**:
155
+
- Find the path: `which t-linter` (macOS/Linux) or `where t-linter` (Windows)
156
+
- Set `t-linter.serverPath` in VSCode settings
157
+
- Restart VSCode
108
158
109
159
### No syntax highlighting
110
-
1. Ensure Python semantic highlighting is enabled
111
-
2. Check that your template strings use the `t"..."` syntax
112
-
3. Verify type annotations are correctly formatted
160
+
1. Ensure both the PyPI package AND VSCode extension are installed
161
+
2. Check that Python semantic highlighting is enabled in VSCode
162
+
3. Verify your template strings use the `t"..."` syntax
163
+
4. Ensure type annotations are correctly formatted
164
+
5. Try restarting the language server: `Ctrl+Shift+P` → "T-Linter: Restart Server"
113
165
114
166
### Performance issues
115
167
- Disable `t-linter.enableTypeChecking` if you don't need cross-module type resolution
116
168
- Set `t-linter.trace.server` to "off" in production
0 commit comments