Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mojo): add mojo language #6441

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [ ] [mermaid](https://github.com/monaqa/tree-sitter-mermaid) (experimental)
- [x] [meson](https://github.com/Decodetalkers/tree-sitter-meson) (maintained by @Decodetalkers)
- [x] [mlir](https://github.com/artagnon/tree-sitter-mlir) (experimental, maintained by @artagnon)
- [x] [mojo](https://github.com/austincummings/tree-sitter-mojo) (maintained by @austincummings)
- [x] [muttrc](https://github.com/neomutt/tree-sitter-muttrc) (maintained by @Freed-Wu)
- [x] [nasm](https://github.com/naclsn/tree-sitter-nasm) (maintained by @ObserverOfTime)
- [ ] [nickel](https://github.com/nickel-lang/tree-sitter-nickel)
Expand Down
3 changes: 3 additions & 0 deletions lockfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@
"mlir": {
"revision": "2812b6c6aa03f1ca8dba2fb1c33d14abb87809e7"
},
"mojo": {
"revision": "414514a0f63848e835fa6517ddfd27bf55e3608e"
},
"muttrc": {
"revision": "90ef60852c410bd964cd3b954366e4c403c17314"
},
Expand Down
8 changes: 8 additions & 0 deletions lua/nvim-treesitter/parsers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,14 @@ list.mlir = {
maintainers = { "@artagnon" },
}

list.mojo = {
install_info = {
url = "https://github.com/austincummings/tree-sitter-mojo",
files = { "src/parser.c", "src/scanner.c" },
},
maintainers = { "@austincummings" },
}

list.muttrc = {
install_info = {
url = "https://github.com/neomutt/tree-sitter-muttrc",
Expand Down
23 changes: 23 additions & 0 deletions queries/mojo/folds.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
(function_definition)
(class_definition)
(while_statement)
(for_statement)
(if_statement)
(with_statement)
(try_statement)
(match_statement)
(import_from_statement)
(parameters)
(argument_list)
(parenthesized_expression)
(generator_expression)
(list_comprehension)
(set_comprehension)
(dictionary_comprehension)
(tuple)
(list)
(set)
(dictionary)
(string)
] @fold
Loading
Loading