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
|
@ -213,6 +213,8 @@
|
|||
// Whether to show the signature help after completion or a bracket pair inserted.
|
||||
// If `auto_signature_help` is enabled, this setting will be treated as enabled also.
|
||||
"show_signature_help_after_edits": false,
|
||||
// Whether to show code action button at start of buffer line.
|
||||
"inline_code_actions": true,
|
||||
// What to do when go to definition yields no results.
|
||||
//
|
||||
// 1. Do nothing: `none`
|
||||
|
@ -324,7 +326,7 @@
|
|||
// Whether to show agent review buttons in the editor toolbar.
|
||||
"agent_review": true,
|
||||
// Whether to show code action buttons in the editor toolbar.
|
||||
"code_actions": true
|
||||
"code_actions": false
|
||||
},
|
||||
// Titlebar related settings
|
||||
"title_bar": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue