mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 05:20:00 -04:00
Add support for vlang filetypes. - [ ] Highlight `C` as builtin variable. This is FFI in vlang land, where C act like extern and access c functions. The vlang parser does some extension between C function calls and arguments but I believe highlighting C as builtin variable is sufficient indicator for now. I tried to use offset! but failed. Any suggestions? - [ ] Set up parser url. the vlang parser is located within [vls] repo. Is installing from nested repo supported? `tree_sitter_v/src/parser.c`? [vls]: https://github.com/vlang/vls/tree/master/tree_sitter_v cc @elianiva @theHamsta
29 lines
722 B
Scheme
29 lines
722 B
Scheme
((function_declaration
|
|
name: (identifier) @definition.function)) ;@function
|
|
|
|
(short_var_declaration
|
|
left: (expression_list
|
|
(identifier) @definition.var))
|
|
|
|
((function_declaration
|
|
name: (binded_identifier
|
|
name: (identifier) @definition.function)))
|
|
|
|
(const_declaration (const_spec (identifier) @definition.var))
|
|
|
|
(identifier) @reference
|
|
(type_identifier) @reference
|
|
|
|
((call_expression function: (identifier) @reference)
|
|
(set! reference.kind "call"))
|
|
|
|
((call_expression
|
|
function: (selector_expression
|
|
field: (identifier) @function))
|
|
(set! reference.kind "call"))
|
|
|
|
(source_file) @scope
|
|
(function_declaration) @scope
|
|
(if_expression) @scope
|
|
(block) @scope
|
|
(for_statement) @scope
|