Skip to content

Commit

Permalink
feat: add support for markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnychevalier committed Jul 14, 2024
1 parent fc58135 commit 595d85a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ lang-all = [
"lang-cpp",
"lang-go",
"lang-json",
"lang-markdown",
"lang-python",
"lang-rust",
"lang-toml",
Expand All @@ -24,6 +25,7 @@ lang-c = ["dep:tree-sitter-c"]
lang-cpp = ["dep:tree-sitter-cpp"]
lang-go = ["dep:tree-sitter-go"]
lang-json = ["dep:tree-sitter-json"]
lang-markdown = ["dep:tree-sitter-md"]
lang-python = ["dep:tree-sitter-python"]
lang-rust = ["dep:tree-sitter-rust"]
lang-toml = ["dep:tree-sitter-toml-ng"]
Expand All @@ -39,6 +41,7 @@ tree-sitter-c = { version = "0.21.4", optional = true }
tree-sitter-cpp = { version = "0.22.2", optional = true }
tree-sitter-go = { version = "0.21.0", optional = true }
tree-sitter-json = { version = "0.21.0", optional = true }
tree-sitter-md = { version = "0.2.3", optional = true }
tree-sitter-python = { version = "0.21.0", optional = true }
tree-sitter-rust = { version = "0.21.2", optional = true }
tree-sitter-toml-ng = { version = "0.6.0", optional = true }
Expand Down
1 change: 1 addition & 0 deletions src/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub trait Typo: miette::Diagnostic + std::error::Error + Sync + Send {
}

static VALID_KINDS: &[&str] = &[
"inline",
"line_comment",
"string_content",
"string",
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ static EXTENSION_LANGUAGE: Lazy<HashMap<&'static OsStr, Language>> = Lazy::new(|
map.insert(OsStr::new("yml"), tree_sitter_yaml::language());
#[cfg(feature = "lang-json")]
map.insert(OsStr::new("json"), tree_sitter_json::language());
#[cfg(feature = "lang-markdown")]
map.insert(OsStr::new("md"), tree_sitter_md::language());

map
});
Expand Down

0 comments on commit 595d85a

Please sign in to comment.