From e715adf14f27015fd347ad7432ebe89fd5c48660 Mon Sep 17 00:00:00 2001 From: Stanislav Lapata Date: Sat, 1 Oct 2022 22:13:36 +0200 Subject: [PATCH] add sticky headers to ruby and elixir (#1424) --- lapce-core/src/language.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lapce-core/src/language.rs b/lapce-core/src/language.rs index 946cd71c..0854ed54 100644 --- a/lapce-core/src/language.rs +++ b/lapce-core/src/language.rs @@ -79,7 +79,7 @@ struct SyntaxProperties { language: fn() -> tree_sitter::Language, /// For most languages, it is `tree_sitter_$crate::HIGHLIGHT_QUERY`. highlight: &'static str, - /// For most languages, it is `tree_sitter_$crate::INJECTION_QUERY`. + /// For most languages, it is `tree_sitter_$crate::INJECTION_QUERY`. /// Though, not all languages have injections. injection: Option<&'static str>, /// The comment token. "#" for python, "//" for rust for example. @@ -318,7 +318,7 @@ pub enum LapceLanguage { comment: "#", indent: " ", code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST), - sticky_headers: &[], + sticky_headers: &["do_block"], extensions: &["ex", "exs", "eex", "heex", "sface"], }, #[cfg(feature = "lang-elm")] @@ -652,7 +652,8 @@ pub enum LapceLanguage { comment: "#", indent: " ", code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST), - sticky_headers: &[], + sticky_headers: &["module", "class", "method", "do_block"], + extensions: &["rb"], }, #[cfg(feature = "lang-rust")]