Generic methods not highlighted correctly
musjj opened this issue · 9 comments
Tree-Sitter Grammars do not, themselves, do any syntax highlighting.
What IDE/editor/viewer are you using?
Your block of code parses as:
(compilation_unit
(global_statement
(local_declaration_statement
(variable_declaration
(identifier)
(variable_declarator
(identifier)
(equals_value_clause
(invocation_expression
(generic_name
(identifier)
(type_argument_list
(identifier)))
(argument_list
(argument
(string_literal)))))))))
(global_statement
(expression_statement
(invocation_expression
(generic_name
(identifier)
(type_argument_list
(identifier)))
(argument_list
(argument
(string_literal)))))))
So both of them are mapping to the exact same block during the parsing phase. I checkout our tagging system which is used by highlighters as well:
While I'm not familiar with NeoVIM I would suggest trying to disable OmniSharp to see if the syntax on first then matches the syntax on the second.
I've found this - it seems to be a very recent regression, let me investigate.
Regression introduced in #294 which also shows a lack of these use cases in the corpus tests.
Should now be working correctly here - neovim-tree-sitter will need to update their reference to the latest commit on master.
Thanks a lot for the swift response! I'll give it a go once they bumped up the commit in the repo.
This is fixed now, thanks a lot!