From 7d6b73992695d09845f9a6ba3f8c4fdfc76c2c81 Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Mon, 27 Jun 2022 18:57:17 +0100 Subject: [PATCH] fix markdown --- Cargo.lock | 2 +- lapce-core/Cargo.toml | 4 ++-- lapce-core/src/language.rs | 10 +++++----- lapce-ui/Cargo.toml | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed62a35f..a8a41b67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/lapce-core/Cargo.toml b/lapce-core/Cargo.toml index 232c7416..0a07383f 100644 --- a/lapce-core/Cargo.toml +++ b/lapce-core/Cargo.toml @@ -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"] diff --git a/lapce-core/src/language.rs b/lapce-core/src/language.rs index 7b754f25..fe2ef5d2 100644 --- a/lapce-core/src/language.rs +++ b/lapce-core/src/language.rs @@ -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"]); } diff --git a/lapce-ui/Cargo.toml b/lapce-ui/Cargo.toml index 15a2e09f..1601564d 100644 --- a/lapce-ui/Cargo.toml +++ b/lapce-ui/Cargo.toml @@ -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"]