Skip to content

Commit daf8e91

Browse files
authored
Add ty.experimental.rename, ty.inlayHints.variableTypes (#951)
## Summary This PR adds reference documentation for the two new editor settings that were added in astral-sh/ruff#19800 and astral-sh/ruff#19780. ## Test Plan <img width="2491" height="1374" alt="Screenshot 2025-08-07 at 19 24 44" src="https://github.com/user-attachments/assets/f0fc32c5-1045-4fd9-900d-c4e7e429d54f" />
1 parent 7858ecb commit daf8e91

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed

docs/reference/editor-settings.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,140 @@ Determines the scope of the diagnostics reported by the language server.
150150

151151
______________________________________________________________________
152152

153+
## `inlayHints`
154+
155+
These settings control the inline hints that ty provides in an editor.
156+
157+
### `variableTypes`
158+
159+
Whether to show the types of variables as inline hints.
160+
161+
**Default value**: `true`
162+
163+
**Type**: `boolean`
164+
165+
**Example usage**:
166+
167+
=== "VS Code"
168+
169+
```json
170+
{
171+
"ty.inlayHints.variableTypes": false
172+
}
173+
```
174+
175+
=== "Neovim"
176+
177+
```lua
178+
require('lspconfig').ty.setup({
179+
settings = {
180+
ty = {
181+
inlayHints = {
182+
variableTypes = false,
183+
},
184+
},
185+
},
186+
})
187+
188+
-- For Neovim 0.11.0 and later:
189+
vim.lsp.config('ty', {
190+
settings = {
191+
ty = {
192+
inlayHints = {
193+
variableTypes = false,
194+
},
195+
},
196+
},
197+
})
198+
```
199+
200+
=== "Zed"
201+
202+
```json
203+
{
204+
"lsp": {
205+
"ty": {
206+
"settings": {
207+
"ty": {
208+
"inlayHints": {
209+
"variableTypes": false
210+
}
211+
}
212+
}
213+
}
214+
}
215+
}
216+
```
217+
218+
______________________________________________________________________
219+
220+
## `experimental`
221+
222+
These settings control the experimental language features that ty provides in an editor.
223+
224+
### `rename`
225+
226+
Whether to enable the experimental support for renaming symbols in the editor.
227+
228+
**Default value**: `false`
229+
230+
**Type**: `boolean`
231+
232+
**Example usage**:
233+
234+
=== "VS Code"
235+
236+
```json
237+
{
238+
"ty.experimental.rename": true
239+
}
240+
```
241+
242+
=== "Neovim"
243+
244+
```lua
245+
require('lspconfig').ty.setup({
246+
settings = {
247+
ty = {
248+
experimental = {
249+
rename = true,
250+
},
251+
},
252+
},
253+
})
254+
255+
-- For Neovim 0.11.0 and later:
256+
vim.lsp.config('ty', {
257+
settings = {
258+
ty = {
259+
experimental = {
260+
rename = true,
261+
},
262+
},
263+
},
264+
})
265+
```
266+
267+
=== "Zed"
268+
269+
```json
270+
{
271+
"lsp": {
272+
"ty": {
273+
"settings": {
274+
"ty": {
275+
"experimental": {
276+
"rename": true
277+
}
278+
}
279+
}
280+
}
281+
}
282+
}
283+
```
284+
285+
______________________________________________________________________
286+
153287
## VS Code specific
154288

155289
The following settings are specific to [ty's VS Code extension][ty-vscode].

0 commit comments

Comments
 (0)