diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 702cc0483..65fda7fb4 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -427,7 +427,7 @@ impl FileTypeGlobMatcher { #[derive(Debug)] pub struct Syntax { - pub inner: tree_house::Syntax, + inner: tree_house::Syntax, } const PARSE_TIMEOUT: Duration = Duration::from_millis(500); // half a second is pretty generous diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 6ccbde19e..983a9cd8b 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4235,7 +4235,7 @@ pub mod insert { let line_start = text.line_to_char(current_line); let continue_comment_token = comment::get_line_comment_token( - &doc.syn_loader.load(), + &cx.editor.syn_loader.load(), syntax, text, doc_default_comment_token, @@ -5215,7 +5215,7 @@ fn toggle_comments_impl(cx: &mut Context, comments_transaction: CommentTransacti doc_line_token, doc_block_tokens, syntax, - &doc.syn_loader.load(), + &cx.editor.syn_loader.load(), ); doc.apply(&transaction, view.id); diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 0369356dc..fb89e2e0c 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -213,7 +213,7 @@ pub struct Document { // NOTE: this field should eventually go away - we should use the Editor's syn_loader instead // of storing a copy on every doc. Then we can remove the surrounding `Arc` and use the // `ArcSwap` directly. - pub syn_loader: Arc>, + syn_loader: Arc>, } #[derive(Debug, Clone, Default)]