editor: Inline Code Actions Indicator (#31432)
Follow up to https://github.com/zed-industries/zed/pull/30140 and https://github.com/zed-industries/zed/pull/31236 This PR introduces an inline code action indicator that shows up at the start of a buffer line when there's enough space. If space is tight, it adjusts to lines above or below instead. It also adjusts when cursor is near indicator. The indicator won't appear if there's no space within about 8 rows in either direction, and it also stays hidden for folded ranges. It also won't show up in case there is not space in multi buffer excerpt. These cases account for very little because practically all languages do have indents. https://github.com/user-attachments/assets/1363ee8a-3178-4665-89a7-c86c733f2885 This PR also sets the existing `toolbar.code_actions` setting to `false` in favor of this. Release Notes: - Added code action indicator which shows up inline at the start of the row. This can be disabled by setting `inline_code_actions` to `false`.
This commit is contained in:
parent
5a0a8ce30a
commit
625bf09830
6 changed files with 259 additions and 12 deletions
|
@ -1203,6 +1203,16 @@ or
|
|||
}
|
||||
```
|
||||
|
||||
### Show Inline Code Actions
|
||||
|
||||
- Description: Whether to show code action button at start of buffer line.
|
||||
- Setting: `inline_code_actions`
|
||||
- Default: `true`
|
||||
|
||||
**Options**
|
||||
|
||||
`boolean` values
|
||||
|
||||
## Editor Toolbar
|
||||
|
||||
- Description: Whether or not to show various elements in the editor toolbar.
|
||||
|
@ -1215,7 +1225,7 @@ or
|
|||
"quick_actions": true,
|
||||
"selections_menu": true,
|
||||
"agent_review": true,
|
||||
"code_actions": true
|
||||
"code_actions": false
|
||||
},
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue