Skip to content

Commit

Permalink
Fixes #42: coloring problem with BarOrientation and GraphOrientation
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsIch committed Apr 16, 2017
1 parent de5931e commit ba3dbde
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Rainmeter.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,14 @@ contexts:
2: keyword.operator.option.equal.rainmeter
4: invalid.rainmeter

#
# Matches either Horizontal, Vertical or in quotation marks
# group one captures GraphOrientation
# because group 2 is the inner one
- match: "(?i)^\\s*((Graph|Bar)Orientation)\\s*(=)\\s*((Horizontal|Vertical)|\"(Horizontal|Vertical)\")\\s*$"
scope: meta.option.Orientation.rainmeter
captures:
1: storage.type.option.predefined.rainmeter
2: keyword.operator.option.equal.rainmeter
3: keyword.operator.option.equal.rainmeter
4: support.constant.option_values.rainmeter

#
Expand Down Expand Up @@ -545,7 +547,7 @@ contexts:
3: keyword.operator.option.equal.rainmeter

# Predefined options for meters and measures
- match: "(?i)^\\s*(Program|Parameter|State|OutputFile|OutputType|StartInFolder|Background|BackgroundMode|BackgroundMargins|AccurateText|DefaultUpdateDivider|ImageCrop|Greyscale|Image(Name|Tint|Flip|Rotate|Alpha|Crop)|UseExifOrientation|SolidColor(2)?|GradientAngle|beveltype|Blur|BlurRegion([2-9]{1,1}|[0-9]{2,})?|Update|TransitionUpdate|Skin(Width|Height)|DragMargins|OnRefreshAction|OnCloseAction|On(Un)?FocusAction|OnChangeAction|OnUpdateAction|OnWakeAction|Author|Description|AppVersion|LocalFont([2-9]{1,1}|[0-9]{2,})?|DynamicVariables|Name|Information|Version|License|Group|Measure|InvertMeasure|Disabled|UpdateDivider|StartValue|EndValue|Increment|LoopCount|(Max|Min)Value|AverageSize|Action|ActionList([0-9])+|IgnoreWarnings|If(Above|Equal|Below)(Value|Action)|IfCondition([2-9]{1,1}|[0-9]{2,})?|If(True|False)Action([2-9]{1,1}|[0-9]{2,})?|IfMatch([2-9]{1,1}|[0-9]{2,})?|If(Not)?MatchAction([2-9]{1,1}|[0-9]{2,})?|Substitute|Formula|UpdateRandom|UniqueRandom|(Low|High)Bound|Processor|Drive|Total|Label|Type|IgnoreRemovable|DiskQuota|Net(In|Out|Total)Speed|Traffic(Action|Value)|Interface|Cumulative|Plugin|Reg(HKey|Key|Value)|ScriptFile|Format|TimeZone|TimeStamp|TimeStampFormat|TimeStampLocale|FormatLocale|DaylightSavingTime|AddDaysToHours|SecondsValue|Meter|X|Y|W|H|MeterStyle|Shape([2-9]{1,1}|[0-9]{2,})?|Inline(Pattern|Setting)(.*)?|MeasureName([2-9]{1,1}|[0-9]{2,})?|Hidden|AntiAlias|ToolTip(Text|Title|Icon|Type|Width|Hidden)|TransformationMatrix|Padding|Paused|Bar(Color|Image|Border)|(Primary|Secondary|Both)?ColorMatrix[12345]|BarOrientation|Flip|Bitmap(Image|Frames|TransitionFrames|ZeroFrame|Extend|Digits|Align|Separation)|Button(Image|Command)|SecondaryMeasureName|(Primary|Both|Secondary)(Color|Image(Crop|Tint|Flip|Rotate|Alpha)?|Greyscale)|(Primary|Both|Secondary)?ImagePath|Graph(Start|Orientation)|PreserveAspectRatio|ScaleMargins|Tile|MaskImageName|MaskImagePath|MaskImageFlip|MaskImageRotate|Line(Count|Width|Length|Start)|LineColor([2-9]{1,1}|[0-9]{2,})?|Scale([2-9]{1,1}|[0-9]{2,})?|HorizontalLine(s|Color)|Offset(X|Y)|(Start|Rotation)Angle|ValueRemainder|Control(Length|Start|Angle)|(Length|Start)Shift|Solid|Font(Color|Size|EffectColor|Face)|String(Align|Style|Effect|Case|)?|(Pre|Post)Fix|Autoscale|Percentual|NumOfDecimals|Text|ClipString(W|H)?|Angle|(Left|Right|Middle|(X(1|2)))Mouse(Down|Up|DoubleClick)Action|Mouse(Over|Leave)Action|MouseScroll(Down|Up|Left|Right)Action|MouseActionCursor(Name)?|CPUInclude|CPUExclude|TopProcess|CoreTemp(Type|Index)|Folder|InfoType|RegExpFilter|Include(SubFolders|(Hidden|System)Files)|Command[0-9]*|DefaultValue|Password|FocusDismiss|DefaultArtwork|Player(Name|Type|Path)|TrackChangeAction|DisableLeadingZero|PerfMon(Object|Counter|Instance|Difference)|DestAddress|UpdateRate|Timeout(Value)?|PowerState|ProcessName|PathName|Separator|Subfolders|FileFilter|RecycleType|ResCountType|SpeedFan(Type|Number|Scale)|SysInfo(Type|Data)|VD(Manager|MeasureType|DesktopCount|On((De)?Activate|Change)|Desktop|Width|Height|RefreshOnUpdate)|Desktop(Name|Wallpaper)|Screenshot|Url|RegExp(Substitute)?|FinishAction|OnRegExpErrorAction|OnConnectErrorAction|OnDownloadErrorAction|StringIndex(2)?|DecodeCharacterReference|Debug|Debug2File|Download(File)?|ErrorString|ForceReload|LogSubstringErrors|ProxyServer|UserAgent|Header([2-9]{1,1}|[0-9]{2,})?|CodePage|WiFiInfoType|WiFiIntfID|WiFiListStyle|Window(Name|Class|Message)|Context(Title|Action)([2-9]{1,1}|[0-9]{2,})?|Recursive|Count|Show(DotDot|Folder|File|Hidden|System)|(Hide)?Extensions|Sort(Date)?Type|SortAscending|Port|ID|RMSAttack|RMSDecay|RMSGain|PeakAttack|PeakDecay|PeakGain|FFTSize|FFTOverlap|FFTAttack|FFTDecay|Bands|FreqMin|FreqMax|Sensitivity|Parent|Channel|Type|FFTIdx|BandIdx|WildcardSearch|Index|IgnoreCount|DateType|Icon(Path|Size))\\s*(=)"
- match: "(?i)^\\s*(Program|Parameter|State|OutputFile|OutputType|StartInFolder|Background|BackgroundMode|BackgroundMargins|AccurateText|DefaultUpdateDivider|ImageCrop|Greyscale|Image(Name|Tint|Flip|Rotate|Alpha|Crop)|UseExifOrientation|SolidColor(2)?|GradientAngle|beveltype|Blur|BlurRegion([2-9]{1,1}|[0-9]{2,})?|Update|TransitionUpdate|Skin(Width|Height)|DragMargins|OnRefreshAction|OnCloseAction|On(Un)?FocusAction|OnChangeAction|OnUpdateAction|OnWakeAction|Author|Description|AppVersion|LocalFont([2-9]{1,1}|[0-9]{2,})?|DynamicVariables|Name|Information|Version|License|Group|Measure|InvertMeasure|Disabled|UpdateDivider|StartValue|EndValue|Increment|LoopCount|(Max|Min)Value|AverageSize|Action|ActionList([0-9])+|IgnoreWarnings|If(Above|Equal|Below)(Value|Action)|IfCondition([2-9]{1,1}|[0-9]{2,})?|If(True|False)Action([2-9]{1,1}|[0-9]{2,})?|IfMatch([2-9]{1,1}|[0-9]{2,})?|If(Not)?MatchAction([2-9]{1,1}|[0-9]{2,})?|Substitute|Formula|UpdateRandom|UniqueRandom|(Low|High)Bound|Processor|Drive|Total|Label|Type|IgnoreRemovable|DiskQuota|Net(In|Out|Total)Speed|Traffic(Action|Value)|Interface|Cumulative|Plugin|Reg(HKey|Key|Value)|ScriptFile|Format|TimeZone|TimeStamp|TimeStampFormat|TimeStampLocale|FormatLocale|DaylightSavingTime|AddDaysToHours|SecondsValue|Meter|X|Y|W|H|MeterStyle|Shape([2-9]{1,1}|[0-9]{2,})?|Inline(Pattern|Setting)(.*)?|MeasureName([2-9]{1,1}|[0-9]{2,})?|Hidden|AntiAlias|ToolTip(Text|Title|Icon|Type|Width|Hidden)|TransformationMatrix|Padding|Paused|Bar(Color|Image|Border|Orientation)|(Primary|Secondary|Both)?ColorMatrix[12345]|Flip|Bitmap(Image|Frames|TransitionFrames|ZeroFrame|Extend|Digits|Align|Separation)|Button(Image|Command)|SecondaryMeasureName|(Primary|Both|Secondary)(Color|Image(Crop|Tint|Flip|Rotate|Alpha)?|Greyscale)|(Primary|Both|Secondary)?ImagePath|Graph(Start|Orientation)|PreserveAspectRatio|ScaleMargins|Tile|MaskImageName|MaskImagePath|MaskImageFlip|MaskImageRotate|Line(Count|Width|Length|Start)|LineColor([2-9]{1,1}|[0-9]{2,})?|Scale([2-9]{1,1}|[0-9]{2,})?|HorizontalLine(s|Color)|Offset(X|Y)|(Start|Rotation)Angle|ValueRemainder|Control(Length|Start|Angle)|(Length|Start)Shift|Solid|Font(Color|Size|EffectColor|Face)|String(Align|Style|Effect|Case|)?|(Pre|Post)Fix|Autoscale|Percentual|NumOfDecimals|Text|ClipString(W|H)?|Angle|(Left|Right|Middle|(X(1|2)))Mouse(Down|Up|DoubleClick)Action|Mouse(Over|Leave)Action|MouseScroll(Down|Up|Left|Right)Action|MouseActionCursor(Name)?|CPUInclude|CPUExclude|TopProcess|CoreTemp(Type|Index)|Folder|InfoType|RegExpFilter|Include(SubFolders|(Hidden|System)Files)|Command[0-9]*|DefaultValue|Password|FocusDismiss|DefaultArtwork|Player(Name|Type|Path)|TrackChangeAction|DisableLeadingZero|PerfMon(Object|Counter|Instance|Difference)|DestAddress|UpdateRate|Timeout(Value)?|PowerState|ProcessName|PathName|Separator|Subfolders|FileFilter|RecycleType|ResCountType|SpeedFan(Type|Number|Scale)|SysInfo(Type|Data)|VD(Manager|MeasureType|DesktopCount|On((De)?Activate|Change)|Desktop|Width|Height|RefreshOnUpdate)|Desktop(Name|Wallpaper)|Screenshot|Url|RegExp(Substitute)?|FinishAction|OnRegExpErrorAction|OnConnectErrorAction|OnDownloadErrorAction|StringIndex(2)?|DecodeCharacterReference|Debug|Debug2File|Download(File)?|ErrorString|ForceReload|LogSubstringErrors|ProxyServer|UserAgent|Header([2-9]{1,1}|[0-9]{2,})?|CodePage|WiFiInfoType|WiFiIntfID|WiFiListStyle|Window(Name|Class|Message)|Context(Title|Action)([2-9]{1,1}|[0-9]{2,})?|Recursive|Count|Show(DotDot|Folder|File|Hidden|System)|(Hide)?Extensions|Sort(Date)?Type|SortAscending|Port|ID|RMSAttack|RMSDecay|RMSGain|PeakAttack|PeakDecay|PeakGain|FFTSize|FFTOverlap|FFTAttack|FFTDecay|Bands|FreqMin|FreqMax|Sensitivity|Parent|Channel|Type|FFTIdx|BandIdx|WildcardSearch|Index|IgnoreCount|DateType|Icon(Path|Size))\\s*(=)"
scope: meta.option.predefined.rainmeter
captures:
1: storage.type.option.predefined.rainmeter
Expand Down

0 comments on commit ba3dbde

Please sign in to comment.