Skip to content

Commit a814764

Browse files
committed
refactor: rename branches to branch_exit_points in highlight_related
1 parent cec8955 commit a814764

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

crates/ide/src/highlight_related.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct HighlightRelatedConfig {
3939
pub break_points: bool,
4040
pub closure_captures: bool,
4141
pub yield_points: bool,
42-
pub branches: bool,
42+
pub branch_exit_points: bool,
4343
}
4444

4545
type HighlightMap = FxHashMap<EditionedFileId, FxHashSet<HighlightedRange>>;
@@ -85,8 +85,8 @@ pub(crate) fn highlight_related(
8585
T![fn] | T![return] | T![->] if config.exit_points => {
8686
highlight_exit_points(sema, token).remove(&file_id)
8787
}
88-
T![match] | T![=>] | T![if] if config.branches => {
89-
highlight_branches(sema, token).remove(&file_id)
88+
T![match] | T![=>] | T![if] if config.branch_exit_points => {
89+
highlight_branch_exit_points(sema, token).remove(&file_id)
9090
}
9191
T![await] | T![async] if config.yield_points => {
9292
highlight_yield_points(sema, token).remove(&file_id)
@@ -834,7 +834,7 @@ mod tests {
834834
references: true,
835835
closure_captures: true,
836836
yield_points: true,
837-
branches: true,
837+
branch_exit_points: true,
838838
};
839839

840840
#[track_caller]

crates/rust-analyzer/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ config_data! {
9494

9595

9696
/// Enables highlighting of related return values while the cursor is on any `match`, `if`, or match arm arrow (`=>`).
97-
highlightRelated_branches_enable: bool = true,
97+
highlightRelated_branchExitPoints_enable: bool = true,
9898
/// Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.
9999
highlightRelated_breakPoints_enable: bool = true,
100100
/// Enables highlighting of all captures of a closure while the cursor is on the `|` or move keyword of a closure.
@@ -1596,7 +1596,7 @@ impl Config {
15961596
exit_points: self.highlightRelated_exitPoints_enable().to_owned(),
15971597
yield_points: self.highlightRelated_yieldPoints_enable().to_owned(),
15981598
closure_captures: self.highlightRelated_closureCaptures_enable().to_owned(),
1599-
branches: self.highlightRelated_branches_enable().to_owned(),
1599+
branch_exit_points: self.highlightRelated_branchExitPoints_enable().to_owned(),
16001600
}
16011601
}
16021602

docs/book/src/configuration_generated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ also need to add the folders to Code's `files.watcherExclude`.
492492
Controls file watching implementation.
493493

494494

495-
**rust-analyzer.highlightRelated.branches.enable** (default: true)
495+
**rust-analyzer.highlightRelated.branchExitPoints.enable** (default: true)
496496

497497
Enables highlighting of related return values while the cursor is on any `match`, `if`, or match arm arrow (`=>`).
498498

editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@
15211521
{
15221522
"title": "highlightRelated",
15231523
"properties": {
1524-
"rust-analyzer.highlightRelated.branches.enable": {
1524+
"rust-analyzer.highlightRelated.branchExitPoints.enable": {
15251525
"markdownDescription": "Enables highlighting of related return values while the cursor is on any `match`, `if`, or match arm arrow (`=>`).",
15261526
"default": true,
15271527
"type": "boolean"

0 commit comments

Comments
 (0)