From feb30c9ff4e33907c3b6336737b2909cd8c48c59 Mon Sep 17 00:00:00 2001 From: NiceSieve <92229915+NiceSieve@users.noreply.github.com> Date: Tue, 27 Sep 2022 23:34:03 +0300 Subject: [PATCH] add sticky headers for C and C++ (#1377) * add sticky headers for C and C++ * run rustfmt --- lapce-core/src/language.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lapce-core/src/language.rs b/lapce-core/src/language.rs index df0a4d2e..cc7dd419 100644 --- a/lapce-core/src/language.rs +++ b/lapce-core/src/language.rs @@ -354,7 +354,7 @@ pub enum LapceLanguage { comment: "//", indent: " ", code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST), - sticky_headers: &[], + sticky_headers: &["function_definition", "struct_specifier"], extensions: &["c", "h"], }, #[cfg(feature = "lang-cpp")] @@ -366,7 +366,11 @@ pub enum LapceLanguage { comment: "//", indent: " ", code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST), - sticky_headers: &[], + sticky_headers: &[ + "function_definition", + "class_specifier", + "struct_specifier", + ], extensions: &["cpp", "cxx", "cc", "c++", "hpp", "hxx", "hh", "h++"], }, #[cfg(feature = "lang-json")]