mirror of
https://github.com/nvim-treesitter/nvim-treesitter-context
synced 2024-09-16 14:14:03 +02:00
add Salesforce Apex language support
This commit is contained in:
parent
b219328663
commit
400a99ad43
3 changed files with 54 additions and 0 deletions
|
@ -16,6 +16,7 @@ Note: if you need support for Neovim 0.6.x please use the tag `compat/0.6`.
|
|||
<details>
|
||||
<summary>click to expand</summary
|
||||
|
||||
- [x] `apex`
|
||||
- [x] `bash`
|
||||
- [x] `c`
|
||||
- [x] `c_sharp`
|
||||
|
|
17
queries/apex/context.scm
Normal file
17
queries/apex/context.scm
Normal file
|
@ -0,0 +1,17 @@
|
|||
(if_statement
|
||||
consequence: (_) @context.end
|
||||
) @context
|
||||
|
||||
(method_declaration
|
||||
body: (_) @context.end
|
||||
) @context
|
||||
|
||||
(for_statement
|
||||
body: (_) @context.end
|
||||
) @context
|
||||
|
||||
(enhanced_for_statement
|
||||
body: (_) @context.end
|
||||
) @context
|
||||
|
||||
(expression_statement) @context
|
36
test/test.apex
Normal file
36
test/test.apex
Normal file
|
@ -0,0 +1,36 @@
|
|||
public class MyClass {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void my_method(Integer param) {
|
||||
|
||||
|
||||
|
||||
|
||||
if (true) {
|
||||
|
||||
|
||||
|
||||
|
||||
for (Integer i = 0; i < 10; i++) {
|
||||
|
||||
|
||||
|
||||
|
||||
for (Integer v : values) {
|
||||
|
||||
|
||||
|
||||
|
||||
System.
|
||||
|
||||
|
||||
|
||||
debug('a message');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue