@@ -59,7 +59,6 @@ impl EditorView {
59 &mut self.spinners
59 &mut self.spinners
62− #[allow(clippy::too_many_arguments)]
63 pub fn render_view(
62 pub fn render_view(
65 editor: &Editor,
64 editor: &Editor,
@@ -68,13 +67,13 @@ impl EditorView {
68 viewport: Rect,
67 viewport: Rect,
69 surface: &mut Surface,
68 surface: &mut Surface,
70 is_focused: bool,
69 is_focused: bool,
71− loader: &syntax::Loader,
73 let inner = view.inner_area();
71 let inner = view.inner_area();
74 let area = view.area;
72 let area = view.area;
75 let theme = &editor.theme;
73 let theme = &editor.theme;
77− let highlights = Self::doc_syntax_highlights(doc, view.offset, inner.height, theme, loader);
76+ Self::doc_syntax_highlights(doc, view.offset, inner.height, theme, &editor.syn_loader);
78 let highlights = syntax::merge(highlights, Self::doc_diagnostics_highlights(doc, theme));
77 let highlights = syntax::merge(highlights, Self::doc_diagnostics_highlights(doc, theme));
79 let highlights: Box<dyn Iterator<Item = HighlightEvent>> = if is_focused {
78 let highlights: Box<dyn Iterator<Item = HighlightEvent>> = if is_focused {
80 Box::new(syntax::merge(
79 Box::new(syntax::merge(
@@ -117,7 +116,6 @@ impl EditorView {
117 /// Get syntax highlights for a document in a view represented by the first line
116 /// Get syntax highlights for a document in a view represented by the first line
118 /// and column (`offset`) and the last line. This is done instead of using a view
117 /// and column (`offset`) and the last line. This is done instead of using a view
119 /// directly to enable rendering syntax highlighted docs anywhere (eg. picker preview)
118 /// directly to enable rendering syntax highlighted docs anywhere (eg. picker preview)
120− #[allow(clippy::too_many_arguments)]
121 pub fn doc_syntax_highlights<'doc>(
119 pub fn doc_syntax_highlights<'doc>(
122 doc: &'doc Document,
120 doc: &'doc Document,
123 offset: Position,
121 offset: Position,
@@ -556,7 +554,6 @@ impl EditorView {
559− #[allow(clippy::too_many_arguments)]
560 pub fn render_statusline(
557 pub fn render_statusline(
562 doc: &Document,
559 doc: &Document,
@@ -1154,8 +1151,7 @@ impl Component for EditorView {
1155 for (view, is_focused) in cx.editor.tree.views() {
1152 for (view, is_focused) in cx.editor.tree.views() {
1156 let doc = cx.editor.document(view.doc).unwrap();
1153 let doc = cx.editor.document(view.doc).unwrap();
1157− let loader = &cx.editor.syn_loader;
1158− self.render_view(cx.editor, doc, view, area, surface, is_focused, loader);
1154+ self.render_view(cx.editor, doc, view, area, surface, is_focused);
1161 if cx.editor.config.auto_info {
1157 if cx.editor.config.auto_info {