diff --git a/Cargo.lock b/Cargo.lock index 40f47aab..59c2f23d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -576,6 +576,7 @@ dependencies = [ "tree-sitter-bash", "tree-sitter-c", "tree-sitter-c-sharp", + "tree-sitter-cmake", "tree-sitter-cpp", "tree-sitter-go", "tree-sitter-haskell", @@ -1730,6 +1731,16 @@ dependencies = [ "tree-sitter", ] +[[package]] +name = "tree-sitter-cmake" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43e478c42991a8893a82295731fca038083894eb38b4eba1f05b43231beb7658" +dependencies = [ + "cc", + "tree-sitter", +] + [[package]] name = "tree-sitter-cpp" version = "0.20.5" diff --git a/harper-comments/Cargo.toml b/harper-comments/Cargo.toml index 15539bfa..1075a860 100644 --- a/harper-comments/Cargo.toml +++ b/harper-comments/Cargo.toml @@ -19,6 +19,7 @@ tree-sitter-javascript = "0.20.1" tree-sitter-go = "0.20.0" tree-sitter-c = "0.20.7" tree-sitter-cpp = "0.20.5" +tree-sitter-cmake = "=0.4.1" tree-sitter-ruby = "0.20.1" tree-sitter-swift = "=0.4.0" tree-sitter-c-sharp = "0.20.0" diff --git a/harper-comments/src/comment_parser.rs b/harper-comments/src/comment_parser.rs index aa1bf757..923b899b 100644 --- a/harper-comments/src/comment_parser.rs +++ b/harper-comments/src/comment_parser.rs @@ -29,6 +29,7 @@ impl CommentParser { "go" => tree_sitter_go::language(), "c" => tree_sitter_c::language(), "cpp" => tree_sitter_cpp::language(), + "cmake" => tree_sitter_cmake::language(), "ruby" => tree_sitter_ruby::language(), "swift" => tree_sitter_swift::language(), "csharp" => tree_sitter_c_sharp::language(), @@ -77,6 +78,7 @@ impl CommentParser { "go" => "go", "c" => "c", "cpp" => "cpp", + "cmake" => "cmake", "h" => "cpp", "rb" => "ruby", "swift" => "swift",