tree-sitter-ruby icon indicating copy to clipboard operation
tree-sitter-ruby copied to clipboard

Global variables not highlighted

Open lmburns opened this issue 4 years ago • 1 comments

I see in your code you have a regex for capturing global variables, but could not find it in the .scm files. I am unsure how to add global variables to them otherwise I would do that and create a pull request.

When using tree-sitter playground in nvim, there is also no capture group name, however when the playground helper is expanded, it does show that it is a global_variable, but doesn't have a name such as rubyTSGlobalVariable.

I have noticed that they do highlight whenever they're involved in string interpolation, but not when they're by themselves. Picture is related: 2022-01-16_20-19

I'll also add that BEGIN or END are not highlighted either

Extra addition: Would it be possible to separate fully capitalized constants from ordinary types? Another question would be to separate builtin types from custom types?

I'll try and learn how to do some of this to help contribute.

lmburns avatar Jan 17 '22 02:01 lmburns

Fix in https://github.com/nvim-treesitter/nvim-treesitter/commit/8961b598dc68d74e6de4063945e2a4cb159b162c

yorik1984 avatar Jan 12 '23 22:01 yorik1984