Skip to content

Conversation

@AlexandrosAlexiou
Copy link

Fixes incorrect syntax highlighting for 'suspend' keyword.

Problem:
'suspend' was listed as @function.builtin but it's actually a modifier keyword, not a function. This caused wrong colors.

Changes:

highlights.scm: Removed "suspend" from builtin functions list
'suspend' is already highlighted correctly as a modifier via function_modifier and _type_modifier rules.

Example:
suspend fun fetchData() // 'suspend' is a modifier
// NOT a function like println()

Tests: 111/111 pass

@AlexandrosAlexiou AlexandrosAlexiou changed the title Fix/suspend highlighting Remove suspend from builtin functions - it's a modifier keyword Dec 20, 2025
Fixes fwcd#197

The 'suspend' keyword is a function modifier in Kotlin used to mark
suspending functions for coroutines. It should not be highlighted as
a builtin function like println() or arrayOf().

This change removes 'suspend' from the @function.builtin list in the
highlights query, allowing it to be correctly highlighted as a keyword
modifier instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant