Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions queries/nu/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,19 @@ key: (identifier) @property
[
"record"
"table"
] @type.enum
"<" @punctuation.bracket
key: (_) @variable.parameter
] @type.enum)

(collection_type
key: (_) @variable.parameter)

(collection_type
[
","
":"
] @punctuation.special
">" @punctuation.bracket)
"<"
">"
] @punctuation.bracket)

(collection_type
":" @punctuation.special)

(composite_type
"oneof" @type.enum
Expand Down
10 changes: 10 additions & 0 deletions test/highlight/verbose_type_signature.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def foo []: nothing -> list<record<id: string, title?: string, all_titles: list<record<language: string, title: string>>, description: record, links: list<string>, is_locked: bool, original_language?: string, last_volume?: string, last_chapter?: string, publication_demographic?: string, status?: string, year?: int, content_rating?: string, tags: list<record<id: string, name: string, group: string>>, state?: string, chapter_numbers_reset_on_new_volume: bool, created_at?: datetime, updated_at?: datetime, version?: int, available_translated_languages: list<string>, last_uploaded_chapter?: string, rels: list<record<id: string, type: string, related?: string, attributes?: record>>>> {
# ^ type.enum
# ^ variable.parameter
# ^ punctuation.special
# ^ type
# ^ type.enum
# ^ variable.parameter
# ^ type
return []
}
Loading