Skip to content

Commit

Permalink
Merge pull request #199 from lhotamir/add-csharp-foreach
Browse files Browse the repository at this point in the history
add foreach and yield to csharp annotator
  • Loading branch information
dinbtechit authored Oct 10, 2024
2 parents 294801f + 2a57c3a commit ca7957d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# vscode-theme Changelog

## Unreleased
### Added
- CSharp - Adding yield and foreach to provide secondary color.

## 1.10.11 - 2024-07-21

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pluginGroup = com.github.dinbtechit.vscodetheme
pluginName = VSCode Theme
# SemVer format -> https://semver.org
pluginVersion = 1.10.11
pluginVersion = 1.10.12

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 233
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class CSharpAnnotator : BaseAnnotator() {
override fun getKeywordType(element: PsiElement): TextAttributesKey? {
var type: TextAttributesKey? = null
when (element.text) {
"return" -> type = SECONDARY_KEYWORD
"return", "yield" -> type = SECONDARY_KEYWORD
"if", "else", "switch", "case", "default", "break", "continue" -> type = SECONDARY_KEYWORD
"try", "catch", "finally", "throw" -> type = SECONDARY_KEYWORD
"for", "while", "do" -> type = SECONDARY_KEYWORD
"for", "while", "do", "foreach" -> type = SECONDARY_KEYWORD
else -> {}
}
return type
Expand Down

0 comments on commit ca7957d

Please sign in to comment.