cargo fmt & clippy lint
This commit is contained in:
parent
ee430536a4
commit
9546164dc8
3 changed files with 19 additions and 21 deletions
|
@ -1,9 +1,9 @@
|
|||
#![allow(unused)]
|
||||
pub mod commands;
|
||||
pub mod graphemes;
|
||||
pub mod syntax;
|
||||
mod selection;
|
||||
pub mod state;
|
||||
pub mod syntax;
|
||||
mod transaction;
|
||||
|
||||
pub use ropey::{Rope, RopeSlice};
|
||||
|
|
|
@ -859,20 +859,19 @@ where
|
|||
}
|
||||
// If the node represents a reference, then try to find the corresponding
|
||||
// definition in the scope stack.
|
||||
else if Some(capture.index) == layer.config.local_ref_capture_index {
|
||||
if definition_highlight.is_none() {
|
||||
else if Some(capture.index) == layer.config.local_ref_capture_index
|
||||
&& definition_highlight.is_none()
|
||||
{
|
||||
definition_highlight = None;
|
||||
if let Ok(name) = str::from_utf8(&self.source[range.clone()]) {
|
||||
for scope in layer.scope_stack.iter().rev() {
|
||||
if let Some(highlight) =
|
||||
scope.local_defs.iter().rev().find_map(|def| {
|
||||
if let Some(highlight) = scope.local_defs.iter().rev().find_map(|def| {
|
||||
if def.name == name && range.start >= def.value_range.end {
|
||||
Some(def.highlight)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
{
|
||||
}) {
|
||||
reference_highlight = highlight;
|
||||
break;
|
||||
}
|
||||
|
@ -882,7 +881,6 @@ where
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Continue processing any additional matches for the same node.
|
||||
if let Some((next_match, next_capture_index)) = layer.captures.peek() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::{keymap, theme::Theme, Args};
|
||||
use helix_core::{
|
||||
syntax::{HighlightConfiguration, HighlightEvent, Highlighter},
|
||||
state::coords_at_pos,
|
||||
state::Mode,
|
||||
syntax::{HighlightConfiguration, HighlightEvent, Highlighter},
|
||||
State,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue