fix markdown

This commit is contained in:
Dongdong Zhou 2022-06-27 18:57:17 +01:00
parent e370aa9aab
commit 7d6b739926
4 changed files with 11 additions and 11 deletions

2
Cargo.lock generated
View File

@ -4716,7 +4716,7 @@ dependencies = [
[[package]]
name = "tree-sitter-md"
version = "0.0.1"
source = "git+https://github.com/MDeiml/tree-sitter-markdown.git#be3e08acfd85bd87d85f41fde74fdcec25f76dbe"
source = "git+https://github.com/dzhou121/tree-sitter-markdown.git#134c7f870ad17b3c3e40cd90b8bbd08329ac4bbd"
dependencies = [
"cc",
"tree-sitter",

View File

@ -27,7 +27,7 @@ tree-sitter-ruby = { git = "https://github.com/Liberatys/tree-sitter-ruby.git",
tree-sitter-c = { version = "0.20.1", optional = true }
tree-sitter-cpp = { version = "0.20.0", optional = true }
tree-sitter-json = { version = "0.19.0", optional = true }
tree-sitter-md = { git = "https://github.com/MDeiml/tree-sitter-markdown.git", version = "0.0.1", optional = true }
tree-sitter-md = { git = "https://github.com/dzhou121/tree-sitter-markdown.git", version = "0.0.1", optional = true }
tree-sitter-html = { version = "0.19.0", optional = true }
tree-sitter-java = { git = "https://github.com/tree-sitter/tree-sitter-java.git", version = "0.20.0", optional = true }
tree-sitter-elm = { version = "5.6.0", optional = true }
@ -66,7 +66,7 @@ lang-ruby = ["dep:tree-sitter-ruby"]
lang-c = ["dep:tree-sitter-c"]
lang-cpp = ["dep:tree-sitter-cpp"]
lang-json = ["dep:tree-sitter-json"]
lang-md = ["dep:tree-sitter-md"]
lang-markdown = ["dep:tree-sitter-md"]
lang-html = ["dep:tree-sitter-html"]
lang-java = ["dep:tree-sitter-java"]
lang-elm = ["dep:tree-sitter-elm"]

View File

@ -122,7 +122,7 @@ pub enum LapceLanguage {
Cpp,
#[cfg(feature = "lang-json")]
Json,
#[cfg(feature = "lang-md")]
#[cfg(feature = "lang-markdown")]
Markdown,
#[cfg(feature = "lang-ruby")]
Ruby,
@ -316,11 +316,11 @@ pub enum LapceLanguage {
code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST),
extensions: &["json"],
},
#[cfg(feature = "lang-md")]
#[cfg(feature = "lang-markdown")]
SyntaxProperties {
id: LapceLanguage::Markdown,
language: tree_sitter_md::language,
highlight: tree_sitter_md::HIGHLIGHTS_QUERY,
highlight: tree_sitter_md::HIGHLIGHT_QUERY,
comment: "",
indent: " ",
code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST),
@ -698,8 +698,8 @@ fn test_json_lang() {
}
#[test]
#[cfg(feature = "lang-md")]
fn test_md_lang() {
#[cfg(feature = "lang-markdown")]
fn test_markdown_lang() {
assert_language(LapceLanguage::Markdown, &["md"]);
}

View File

@ -59,7 +59,7 @@ default = ["all-languages"]
# To build lapce with only some of the supported languages, for example:
#
# cargo build --no-default-features -p lapce-ui \
# --features lang-rust,lang-toml,lang-md,lang-json
# --features lang-rust,lang-toml,lang-markdown,lang-json
#
all-languages = [
"lang-rust",
@ -74,7 +74,7 @@ all-languages = [
"lang-c",
"lang-cpp",
"lang-json",
"lang-md",
"lang-markdown",
"lang-html",
"lang-java",
"lang-elm",
@ -104,7 +104,7 @@ lang-ruby= ["lapce-core/lang-ruby"]
lang-c = ["lapce-core/lang-c"]
lang-cpp = ["lapce-core/lang-cpp"]
lang-json= ["lapce-core/lang-json"]
lang-md = ["lapce-core/lang-md"]
lang-markdown = ["lapce-core/lang-markdown"]
lang-html = ["lapce-core/lang-html"]
lang-java = ["lapce-core/lang-java"]
lang-elm = ["lapce-core/lang-elm"]