Skip to content

Commit

Permalink
feat: support for Lua (#2530)
Browse files Browse the repository at this point in the history
* feat: add lua language configuration

* feat: add lua repository context support

* updating programming-languages.md

* Update website/docs/programming-languages.md

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Meng Zhang <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 27, 2024
1 parent 1c14dc1 commit 24af7a1
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
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.

24 changes: 24 additions & 0 deletions crates/tabby-common/assets/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,30 @@ exts = ["jl"]
[[config]]
languages = ["lua"]
exts = ["lua"]
line_comment = "--"
top_level_keywords = [
"and",
"break",
"do",
"else",
"elseif",
"end",
"false",
"for",
"function",
"if",
"in",
"local",
"nil",
"not",
"or",
"repeat",
"return",
"then",
"true",
"until",
"while"
]

[[config]]
languages = ["makefile"]
Expand Down
1 change: 1 addition & 0 deletions crates/tabby-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ tree-sitter-c = { git = "https://github.com/tree-sitter/tree-sitter-c/", rev = "
tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "d29fbff" }
tree-sitter-c-sharp = "0.21.2"
tree-sitter-solidity = { git = "https://github.com/JoranHonig/tree-sitter-solidity", rev = "0e86ae647bda22c9bee00ec59752df7b3d3b000b" }
tree-sitter-lua = "0.1.0"
ignore.workspace = true
tokio = { workspace = true, features = ["process"] }
text-splitter = { version = "0.13.3", features = ["code"] }
Expand Down
11 changes: 11 additions & 0 deletions crates/tabby-scheduler/src/code/languages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ lazy_static! {
.unwrap(),
),
),
(
"lua",
TagsConfigurationSync(
TagsConfiguration::new(
tree_sitter_lua::language(),
tree_sitter_lua::TAGS_QUERY,
"",
)
.unwrap(),
),
),
])
};
}
2 changes: 1 addition & 1 deletion website/docs/programming-languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ For an actual example of an issue or pull request adding the above support, plea
* [Solidity](https://soliditylang.org/): Since v0.10.0
* [R](https://www.r-project.org/): Since v0.12.0
* [Dart](https://dart.dev/): Since v0.12.0
* [Lua](https://www.lua.org): Since 0.14.0

## Languages Missing Certain Support

Expand All @@ -43,6 +44,5 @@ For an actual example of an issue or pull request adding the above support, plea
| CSS | 🚫 | 🚫 |
| Haskell | 🚫 | 🚫 |
| Julia | 🚫 | 🚫 |
| Lua | 🚫 | 🚫 |
| Perl | 🚫 | 🚫 |
| Scala | 🚫 | 🚫 |

0 comments on commit 24af7a1

Please sign in to comment.