add sticky headers for C and C++ (#1377)

* add sticky headers for C and C++

* run rustfmt
This commit is contained in:
NiceSieve 2022-09-27 23:34:03 +03:00 committed by GitHub
parent d14664b21f
commit feb30c9ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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")]