Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

1 change: 1 addition & 0 deletions harper-comments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tree-sitter-toml-ng = "0.7.0"
tree-sitter-typescript = "0.23.2"
harper-tree-sitter-dart = "0.0.5"
tree-sitter-clojure = "0.1.0"
tree-sitter-julia = "0.23.1"

[dev-dependencies]
paste = "1.0.15"
2 changes: 2 additions & 0 deletions harper-comments/src/comment_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ impl CommentParser {
"java" => tree_sitter_java::LANGUAGE,
"javascript" => tree_sitter_javascript::LANGUAGE,
"javascriptreact" => tree_sitter_typescript::LANGUAGE_TSX,
"julia" => tree_sitter_julia::LANGUAGE,
"kotlin" => tree_sitter_kotlin_ng::LANGUAGE,
"lua" => tree_sitter_lua::LANGUAGE,
"nix" => tree_sitter_nix::LANGUAGE,
Expand Down Expand Up @@ -92,6 +93,7 @@ impl CommentParser {
"java" => "java",
"js" => "javascript",
"jsx" => "javascriptreact",
"jl" => "julia",
"kt" | "kts" => "kotlin",
"lua" => "lua",
"nix" => "nix",
Expand Down
1 change: 1 addition & 0 deletions harper-comments/tests/language_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ create_test!(ignore_shebang_4.sh, 1);
create_test!(common.mill, 1);
create_test!(basic_kotlin.kt, 0);
create_test!(basic.clj, 12);
create_test!(julia.jl, 11);

// Checks that some comments are masked out
create_test!(ignore_comments.rs, 1);
Expand Down
31 changes: 31 additions & 0 deletions harper-comments/tests/language_support_sources/julia.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""
test(x::Number, y::String, z...)

This is a doctring for function `test`. `x test y test z test...` calls this function with
several arguments, like `*(x, y, z...)`.

# Arguments
- `x::Number`: a number
- `y::String`: a string
- `z::Vector`: a vector

# Examples
```jldoctest
julia> a = [1 2; 3 4]
2×2 Matrix{Int64}:
1 2
3 4
```
"""
function test(x::Number, y::String, z::Vector ...)
somethig = 1 # This is a inline comment with too mistakes.
return somethig
end

"Here's a one-line docstring weeth weerd spelleeng."
x = 2

@doc raw"""
This is is annother wei too document zjierb.
"""
f(x) = x
1 change: 1 addition & 0 deletions packages/vscode-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:jj-commit",
"onLanguage:julia",
"onLanguage:kotlin",
"onLanguage:literate haskell",
"onLanguage:lua",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ These configs are under the `markdown` key:
| JavaScript | `javascript` | ✅ |
| JavaScript React | `javascriptreact` | ✅ |
| Jujutsu Description | `jj-commit`/`jjdescription` | |
| Julia | `julia` | ✅ |
| Kotlin | `kotlin` | ✅ |
| Literate Haskell | `lhaskell`/`literate haskell` | |
| Lua | `lua` | ✅ |
Expand Down
Loading