diff --git a/Cargo.lock b/Cargo.lock index 16d26595..3a85c346 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -578,6 +578,7 @@ dependencies = [ "tree-sitter-c-sharp", "tree-sitter-cpp", "tree-sitter-go", + "tree-sitter-haskell", "tree-sitter-java", "tree-sitter-javascript", "tree-sitter-lua", @@ -1749,6 +1750,16 @@ dependencies = [ "tree-sitter", ] +[[package]] +name = "tree-sitter-haskell" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac635b86d6cc127706bc0831f4b83f5503ed8ac2f8cd22831ba3e5535445b4f2" +dependencies = [ + "cc", + "tree-sitter", +] + [[package]] name = "tree-sitter-html" version = "0.19.0" diff --git a/harper-comments/Cargo.toml b/harper-comments/Cargo.toml index d77cecbc..4ead9c54 100644 --- a/harper-comments/Cargo.toml +++ b/harper-comments/Cargo.toml @@ -28,6 +28,7 @@ tree-sitter-bash = "0.20.0" tree-sitter-java = "0.20.0" tree-sitter-nix = "0.0.1" itertools = "0.13.0" +tree-sitter-haskell = "0.15.0" [dev-dependencies] paste = "1.0.15" diff --git a/harper-comments/src/comment_parser.rs b/harper-comments/src/comment_parser.rs index 54536862..ac01f927 100644 --- a/harper-comments/src/comment_parser.rs +++ b/harper-comments/src/comment_parser.rs @@ -36,6 +36,7 @@ impl CommentParser { "lua" => tree_sitter_lua::language(), "shellscript" => tree_sitter_bash::language(), "java" => tree_sitter_java::language(), + "haskell" => tree_sitter_haskell::language(), _ => return None, }; @@ -85,6 +86,8 @@ impl CommentParser { "sh" => "shellscript", "bash" => "shellscript", "java" => "java", + "hs" => "haskell", + "lhs" => "haskell", _ => return None, }) }