Open ghost opened 3 years ago
There seems to be some strange bug in the VSC extension itself that's preventing this highlight.
I'll open an issue at their repository instead.
It's out of VSC's scope. The problem is that this extension doesn't contribute any highlighting.
@mads-hartmann @skovhus could this extension contribute the highlighting tokens defined in:
https://github.com/atom/language-shellscript/blob/685a8b1/grammars/tree-sitter-bash.cson#L75-L144
The scopes that are highlighted exclusively by tree-sitter-bash
:
scopes:
'string > command_substitution': 'embedded.source'
'command_name': 'entity.name.function'
'file_descriptor': 'constant.numeric'
'test_operator': 'entity.other.attribute-name'
'word': [{match: '^-', scopes: 'entity.other.attribute-name'}]
'special_variable_name': 'variable.other.member'
'variable_name': 'variable.other.member'
@SNDST00M I believe that we'd need to implement semantic highlighting (see guide) to achieve what you want. I can't personally dedicate the time to implement this at the moment but I'm happy to review PRs ☺️
I'd appreciate if something like
git branch --delete patch-1
was highlighted appropriately in VSC. The--delete
token would be highlighted as a parameter. Thegit
token would be highlighted as a function.Sample file: https://raw.githubusercontent.com/xtnm/AU-AD/80e8ac1/AE-go_GameServer/check_xml.sh