Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Extend support for outlining in Gleam (#6834)

Marshall Bowers0e722f6288ac
diff --git a/crates/zed/src/languages/gleam/outline.scm b/crates/zed/src/languages/gleam/outline.scm
index 7d983f59473..5df7a6af800 100644
--- a/crates/zed/src/languages/gleam/outline.scm
+++ b/crates/zed/src/languages/gleam/outline.scm
@@ -1,4 +1,31 @@
+(external_type
+ (visibility_modifier)? @context
+ "type" @context
+ (type_name) @name) @item
+
+(type_definition
+ (visibility_modifier)? @context
+ (opacity_modifier)? @context
+ "type" @context
+ (type_name) @name) @item
+
+(data_constructor
+ (constructor_name) @name) @item
+
+(data_constructor_argument
+ (label) @name) @item
+
+(type_alias
+ (visibility_modifier)? @context
+ "type" @context
+ (type_name) @name) @item
+
(function
(visibility_modifier)? @context
"fn" @context
name: (_) @name) @item
+
+(constant
+ (visibility_modifier)? @context
+ "const" @context
+ name: (_) @name) @item