@panic I'm trying to make symbolication for Gleam using a query for it's tree-sitter.
I managed to get top-level functions and top-level types working, but I'd like to get subtypes working hierarchically as well (all Gleam types are essentially enums).
I have the following queries:
(type_definition
(type_name
name: (type_identifier) @name) @subtree
(#set! role enum))
(type_definition
(data_constructors
(data_constructor
name: (constructor_name) @name) @subtree)
(#set! role enum-member))
They both get picked up by the symbols viewer, but my sub types (the bottom one) get's displayed at the same level as the top level ones and does not get nested.
I'm trying to figure this out by looking at the queries in the Rust extension and the ones in the offical Gleam tree-sitter (https://github.com/gleam-lang/tree-sitter-gleam/blob/main/queries/tags.scm), but I think I'm getting something wrong.