feat: supports PHP (#634)
* feat: add php language configuration * feat: add php repository context support * docs: update documentation to indicate php support * Update programming-languages.md * added rev to tree-sitter-php --------- Co-authored-by: Aleksandr Tarabaka <aleksandr.tarabaka@privatbank.ua> Co-authored-by: Meng Zhang <meng@tabbyml.com>add-llama-model-converter
parent
6e59aa8d81
commit
688e7d75b5
|
|
@ -3261,6 +3261,7 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-test",
|
"tracing-test",
|
||||||
"tree-sitter-go",
|
"tree-sitter-go",
|
||||||
|
"tree-sitter-php",
|
||||||
"tree-sitter-python",
|
"tree-sitter-python",
|
||||||
"tree-sitter-ruby",
|
"tree-sitter-ruby",
|
||||||
"tree-sitter-rust",
|
"tree-sitter-rust",
|
||||||
|
|
@ -3991,6 +3992,15 @@ dependencies = [
|
||||||
"tree-sitter",
|
"tree-sitter",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tree-sitter-php"
|
||||||
|
version = "0.19.1"
|
||||||
|
source = "git+https://github.com/tree-sitter/tree-sitter-php.git#0e02e7fab7913a0e77343edb347c8f17cac1f0ba"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"tree-sitter",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tree-sitter-python"
|
name = "tree-sitter-python"
|
||||||
version = "0.20.2"
|
version = "0.20.2"
|
||||||
|
|
|
||||||
|
|
@ -67,3 +67,31 @@ top_level_keywords = [
|
||||||
"rescue",
|
"rescue",
|
||||||
"self",
|
"self",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[config]]
|
||||||
|
languages = ["php"]
|
||||||
|
line_comment = "//"
|
||||||
|
top_level_keywords = [
|
||||||
|
"abstract",
|
||||||
|
"class",
|
||||||
|
"const",
|
||||||
|
"declare",
|
||||||
|
"extends",
|
||||||
|
"final",
|
||||||
|
"finally",
|
||||||
|
"function",
|
||||||
|
"global",
|
||||||
|
"implements",
|
||||||
|
"include_once",
|
||||||
|
"include",
|
||||||
|
"interface",
|
||||||
|
"namespace",
|
||||||
|
"private",
|
||||||
|
"protected",
|
||||||
|
"public",
|
||||||
|
"require_once",
|
||||||
|
"require",
|
||||||
|
"static",
|
||||||
|
"trait",
|
||||||
|
"use",
|
||||||
|
]
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ tree-sitter-rust = "0.20.3"
|
||||||
tree-sitter-typescript = "0.20.3"
|
tree-sitter-typescript = "0.20.3"
|
||||||
tree-sitter-go = "0.20.0"
|
tree-sitter-go = "0.20.0"
|
||||||
tree-sitter-ruby= "0.20.0"
|
tree-sitter-ruby= "0.20.0"
|
||||||
|
tree-sitter-php = { git = "https://github.com/tree-sitter/tree-sitter-php.git", rev = "0e02e7f" }
|
||||||
ignore = "0.4.20"
|
ignore = "0.4.20"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,17 @@ lazy_static! {
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"php",
|
||||||
|
TagsConfigurationSync(
|
||||||
|
TagsConfiguration::new(
|
||||||
|
tree_sitter_php::language(),
|
||||||
|
tree_sitter_php::TAGS_QUERY,
|
||||||
|
"",
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
|
),
|
||||||
|
),
|
||||||
])
|
])
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ For an actual example of an issue or pull request adding the above support, plea
|
||||||
* [TypeScript](https://www.typescriptlang.org/)
|
* [TypeScript](https://www.typescriptlang.org/)
|
||||||
* [Golang](https://go.dev/): Since v0.4.0
|
* [Golang](https://go.dev/): Since v0.4.0
|
||||||
* [Ruby](https://www.ruby-lang.org/): Since v0.4.0
|
* [Ruby](https://www.ruby-lang.org/): Since v0.4.0
|
||||||
|
* [PHP](https://www.php.net/): Since v0.5.0
|
||||||
|
|
||||||
## Languages Missing Certain Support
|
## Languages Missing Certain Support
|
||||||
|
|
||||||
|
|
@ -39,6 +40,5 @@ For an actual example of an issue or pull request adding the above support, plea
|
||||||
| Java | 🚫 | 🚫 |
|
| Java | 🚫 | 🚫 |
|
||||||
| Julia | 🚫 | 🚫 |
|
| Julia | 🚫 | 🚫 |
|
||||||
| Lua | 🚫 | 🚫 |
|
| Lua | 🚫 | 🚫 |
|
||||||
| PHP | 🚫 | 🚫 |
|
|
||||||
| Perl | 🚫 | 🚫 |
|
| Perl | 🚫 | 🚫 |
|
||||||
| Scala | 🚫 | 🚫 |
|
| Scala | 🚫 | 🚫 |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue