Skip to content

Commit

Permalink
Merge pull request #35 from dinbtechit/feature/maintence-2022-11-13
Browse files Browse the repository at this point in the history
feature: go syntax highlighting improvements.
  • Loading branch information
dinbtechit authored Nov 14, 2022
2 parents c3de930 + 066c966 commit d599f75
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 188 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
# vscode-theme Changelog

## [Unreleased]
### Fixed
- Go - improve syntax highlighting

### Changed
- Option to star the github repo

## [1.7.2]
### Fixed
- Bug #31 - Inconsistent ANSI Console Colors
### Fixed
- Bug #31 - Inconsistent ANSI Console Colors

### Added
- Adding Default syntax highlighting for base control statements to match vscode
### Added
- Adding Default syntax highlighting for base control statements to match vscode
- Adding a basic version of Rust specific syntax highlighting.

## [1.7.1]
Expand Down Expand Up @@ -112,4 +117,4 @@
- Added extensive syntax highlighting for Dart/Flutter.

### Fixed
- WelcomeScreen color issues and Toolbar border
- WelcomeScreen color issues and Toolbar border
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.7.2
pluginVersion = 1.7.3

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 211
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.github.dinbtechit.vscodetheme.actions

import com.github.dinbtechit.vscodetheme.icons.VSCodeIcons
import com.intellij.ide.BrowserUtil
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.project.DumbAwareAction

class StarGithubRepoAction: DumbAwareAction("Star Repo", "", VSCodeIcons.GitHub) {

override fun actionPerformed(e: AnActionEvent) {
BrowserUtil.open("https://github.com/dinbtechit/vscode-theme/blob/main/README.md")
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ import com.intellij.util.ObjectUtils
class GoAnnotator : BaseAnnotator() {
companion object {
val DEFAULT_KEYWORD: TextAttributesKey = ObjectUtils.notNull(
TextAttributesKey.find("DEFAULT_KEYWORD"), DefaultLanguageHighlighterColors.KEYWORD
TextAttributesKey.find("DEFAULT_KEYWORD"), DefaultLanguageHighlighterColors.KEYWORD
)
val SECONDARY_KEYWORD: TextAttributesKey = TextAttributesKey.createTextAttributesKey(
"DEFAULT_SECONDARY_KEYWORD",
DEFAULT_KEYWORD
"DEFAULT_SECONDARY_KEYWORD",
DEFAULT_KEYWORD
)
val SECONDARY_KEYWORD_BG: TextAttributesKey = TextAttributesKey.createTextAttributesKey(
"DEFAULT_SECONDARY_KEYWORD_WITH_BG",
DEFAULT_KEYWORD
"DEFAULT_SECONDARY_KEYWORD_WITH_BG",
DEFAULT_KEYWORD
)
}

override fun getKeywordType(element: PsiElement): TextAttributesKey? {
var type: TextAttributesKey? = null
when (element.text) {
Expand All @@ -31,4 +32,4 @@ class GoAnnotator : BaseAnnotator() {
return type
}

}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package com.github.dinbtechit.vscodetheme.icons

import com.intellij.icons.AllIcons
import com.intellij.openapi.util.IconLoader

object VSCodeIcons {
val Logo = IconLoader.getIcon("icons/logo-16.svg", javaClass)
val BuyMeCoffee = IconLoader.getIcon("icons/buy-me-coffee.svg", javaClass)
val GitHubStar = AllIcons.Plugins.Rating
val GitHub = AllIcons.Vcs.Vendors.Github
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.github.dinbtechit.vscodetheme.VSCodeThemeManager
import com.github.dinbtechit.vscodetheme.actions.AlwaysApplyThemeAction
import com.github.dinbtechit.vscodetheme.actions.ApplyThemeAction
import com.github.dinbtechit.vscodetheme.actions.DonateAction
import com.github.dinbtechit.vscodetheme.actions.StarGithubRepoAction
import com.github.dinbtechit.vscodetheme.icons.VSCodeIcons
import com.github.dinbtechit.vscodetheme.settings.VSCodeThemeSettingsStore
import com.intellij.ide.plugins.IdeaPluginDescriptor
Expand Down Expand Up @@ -88,6 +89,7 @@ class VSCodeStartupNotifyActivity : StartupActivity {
}
}
.addAction(DonateAction())
.addAction(StarGithubRepoAction())
// .addAction(DismissNotification(isVSCodeThemeSelected()))
}

Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@
<action id="Support" class="com.github.dinbtechit.vscodetheme.actions.DonateAction"
text="Support">
</action>
<action id="StarGithub" class="com.github.dinbtechit.vscodetheme.actions.StarGithubRepoAction"
text="Star Github Repo">
</action>
</actions>
</idea-plugin>
97 changes: 9 additions & 88 deletions src/main/resources/themes/vscode_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,7 @@
<option name="FOREGROUND" value="dcdcaa"/>
</value>
</option>
<option name="GO_BUILTIN_TYPE_REFERENCE">
<value>
<option name="FOREGROUND" value="4ec9b0"/>
</value>
</option>
<option name="GO_BUILTIN_TYPE_REFERENCE" baseAttributes="DEFAULT_CLASS_REFERENCE"/>
<option name="GO_BUILTIN_VARIABLE">
<value>
<option name="FOREGROUND" value="569cd6"/>
Expand All @@ -453,24 +449,11 @@
<option name="FOREGROUND" value="dcdcaa"/>
</value>
</option>
<option name="GO_EXPORTED_INTERFACE_REFERENCE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_EXPORTED_STRUCT_REFERENCE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_FUNCTION_PARAMETER">
<value>
<option name="FOREGROUND" value="c8c8c8"/>
</value>
</option>
<option name="GO_LABEL">
<value>
<option name="FOREGROUND" value="c8c8c8"/>
<option name="EFFECT_COLOR" value="323333"/>
<option name="EFFECT_TYPE" value="1"/>
</value>
</option>
<option name="GO_LINE_COMMENT">
Expand All @@ -493,26 +476,7 @@
<option name="FOREGROUND" value="dcdcaa"/>
</value>
</option>
<option name="GO_LOCAL_INTERFACE_REFERENCE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_LOCAL_STRUCT_REFERENCE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_LOCAL_VARIABLE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_METHOD_RECEIVER">
<value>
<option name="FOREGROUND" value="c8c8c8"/>
</value>
</option>
<option name="GO_METHOD_RECEIVER" baseAttributes="DEFAULT_LOCAL_VARIABLE"/>
<option name="GO_PACKAGE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
Expand All @@ -523,66 +487,23 @@
<option name="FOREGROUND" value="9cdcfe"/>
</value>
</option>
<option name="GO_PACKAGE_EXPORTED_INTERFACE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_PACKAGE_EXPORTED_STRUCT">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_PACKAGE_EXPORTED_VARIABLE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_PACKAGE_LOCAL_CONSTANT">
<value>
<option name="FOREGROUND" value="9cdcfe"/>
</value>
</option>
<option name="GO_PACKAGE_LOCAL_INTERFACE">
<option name="GO_SHADOWING_VARIABLE" baseAttributes="DEFAULT_LOCAL_VARIABLE"/>
<option name="GO_TAG_TEXT">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_PACKAGE_LOCAL_STRUCT">
<option name="GO_TAG_VALUE">
<value>
<option name="FOREGROUND" value="4ec9b0"/>
</value>
</option>
<option name="GO_PACKAGE_LOCAL_VARIABLE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_SCOPE_VARIABLE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_STRUCT_EXPORTED_MEMBER">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_STRUCT_LOCAL_MEMBER">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_TYPE_REFERENCE">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
</value>
</option>
<option name="GO_TYPE_SPECIFICATION">
<value>
<option name="FOREGROUND" value="d4d4d4"/>
<option name="FOREGROUND" value="cd9069"/>
</value>
</option>
<option name="GO_TYPE_REFERENCE" baseAttributes="DEFAULT_CLASS_REFERENCE"/>
<option name="GO_VALID_STRING_ESCAPE">
<value>
<option name="FOREGROUND" value="d7ba7d"/>
Expand Down
Loading

0 comments on commit d599f75

Please sign in to comment.