The extension supports GDScript outlines starting at version 0.4. It captures all the function definitions, inner classes, enums, constants, signals, and variables.
However, there are a couple of improvements we could make:
[x] Limit the depth at which functions and variables are captured. Local variables and constants should probably not be part of the outline. They can add a lot of volume and noise to the outline.
[x] Add support for displaying the export or onready annotation in front of relevant properties to better distinguish them from other variables and make them easier to search. Currently, all variables display as just var $name.
If someone has experience with tree sitter grammars, I'd love some insights on how this is usually achieved. For the first task, the GDScript parser has special nodes for onready and exported variables but I don't know how to display the @export and @onready annotations in the outline yet.
For the second, I tried using negated predicates like #not-match and negating the query with ! but couldn't make it work yet.
The extension supports GDScript outlines starting at version 0.4. It captures all the function definitions, inner classes, enums, constants, signals, and variables.
However, there are a couple of improvements we could make:
var $name
.If someone has experience with tree sitter grammars, I'd love some insights on how this is usually achieved. For the first task, the GDScript parser has special nodes for onready and exported variables but I don't know how to display the @export and @onready annotations in the outline yet.
For the second, I tried using negated predicates like #not-match and negating the query with ! but couldn't make it work yet.