Skip to content

Commit

Permalink
feat: sync Inlay Hints color
Browse files Browse the repository at this point in the history
  • Loading branch information
loosheng committed Nov 6, 2023
1 parent 6ee78fd commit ce15921
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 21 deletions.
35 changes: 24 additions & 11 deletions script/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export default function getEditorSchemeTheme({ style, name, soft = false, black
? vitesse('lowActiveBackground')
: vitesse('activeBackground')

const punctuation = black
? vitesse('punctuation', 'cc')
: vitesse('punctuation')

const selectionBackgroundInActive = pick({ light: '#22222208', dark: '#eeeeee08' })
const selectionBackgroundActive = pick({ light: '#22222215', dark: '#eeeeee15' })
const selectionBackground = pick({ light: '#22222215', dark: '#eeeeee15' })
Expand Down Expand Up @@ -322,21 +326,10 @@ export default function getEditorSchemeTheme({ style, name, soft = false, black
attributesElement.ele('option', { name: 'DEFAULT_REASSIGNED_LOCAL_VARIABLE', baseAttributes: 'DEFAULT_LOCAL_VARIABLE' })
attributesElement.ele('option', { name: 'DEFAULT_REASSIGNED_PARAMETER', baseAttributes: 'DEFAULT_PARAMETER' })

// <option name="BAD_CHARACTER">
// <value>
// <option name="EFFECT_COLOR" value="af3c3c" />
// <option name="EFFECT_TYPE" value="2" />
// </value>
// </option>
const BAD_CHARACTER = attributesElement.ele('option', { name: 'BAD_CHARACTER' }).ele('value')
BAD_CHARACTER.ele('option', { name: 'EFFECT_COLOR', value: vitesse('red') })
BAD_CHARACTER.ele('option', { name: 'EFFECT_TYPE', value: '2' })

// <option name="DEFAULT_OPERATION_SIGN">
// <value>
// <option name="FOREGROUND" value="c42c2c" />
// </value>
// </option>
const DEFAULT_OPERATION_SIGN = attributesElement.ele('option', { name: 'DEFAULT_OPERATION_SIGN' }).ele('value')
DEFAULT_OPERATION_SIGN.ele('option', { name: 'FOREGROUND', value: vitesse('operator') })

Expand Down Expand Up @@ -620,6 +613,26 @@ export default function getEditorSchemeTheme({ style, name, soft = false, black
INACTIVE_HYPERLINK_ATTRIBUTES.ele('option', { name: 'EFFECT_COLOR', value: vitesse('comment') })
INACTIVE_HYPERLINK_ATTRIBUTES.ele('option', { name: 'EFFECT_TYPE', value: '1' })

// inline parameter hint
const INLINE_PARAMETER_HINT = attributesElement.ele('option', { name: 'INLINE_PARAMETER_HINT' }).ele('value')
INLINE_PARAMETER_HINT.ele('option', { name: 'FOREGROUND', value: punctuation })
INLINE_PARAMETER_HINT.ele('option', { name: 'BACKGROUND', value: '#00000000' })

const INLINE_PARAMETER_HINT_CURRENT = attributesElement.ele('option', { name: 'INLINE_PARAMETER_HINT_CURRENT' }).ele('value')
INLINE_PARAMETER_HINT_CURRENT.ele('option', { name: 'FOREGROUND', value: punctuation })
INLINE_PARAMETER_HINT_CURRENT.ele('option', { name: 'BACKGROUND', value: '#00000000' })

const INLINE_PARAMETER_HINT_HIGHLIGHTED = attributesElement.ele('option', { name: 'INLINE_PARAMETER_HINT_HIGHLIGHTED' }).ele('value')
INLINE_PARAMETER_HINT_HIGHLIGHTED.ele('option', { name: 'FOREGROUND', value: punctuation })
INLINE_PARAMETER_HINT_HIGHLIGHTED.ele('option', { name: 'BACKGROUND', value: '#00000000' })

// <option name="INLINE_REFACTORING_SETTINGS_DEFAULT" value="ad1010" />
// <option name="INLINE_REFACTORING_SETTINGS_FOCUSED" value="ad1010" />
// <option name="INLINE_REFACTORING_SETTINGS_HOVERED" value="ad1010" />
attributesElement.ele('option', { name: 'INLINE_REFACTORING_SETTINGS_DEFAULT', value: '#00000000' })
attributesElement.ele('option', { name: 'INLINE_REFACTORING_SETTINGS_FOCUSED', value: '#00000000' })
attributesElement.ele('option', { name: 'INLINE_REFACTORING_SETTINGS_HOVERED', value: '#00000000' })

return {
editorTheme: theme.end({ pretty: true }),
UITheme: {
Expand Down
25 changes: 23 additions & 2 deletions src/main/resources/themes/vitesse.black.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@
<option name="FOREGROUND" value="#cb7676"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_CALL">
<option name="DEFAULT_FUNCTION_DECLARATION">
<value>
<option name="FOREGROUND" value="#80a665"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_DECLARATION">
<option name="DEFAULT_FUNCTION_CALL">
<value>
<option name="FOREGROUND" value="#80a665"/>
</value>
Expand Down Expand Up @@ -454,5 +454,26 @@
<option name="EFFECT_TYPE" value="1"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT">
<value>
<option name="FOREGROUND" value="#666666cc"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_CURRENT">
<value>
<option name="FOREGROUND" value="#666666cc"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_HIGHLIGHTED">
<value>
<option name="FOREGROUND" value="#666666cc"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_REFACTORING_SETTINGS_DEFAULT" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_FOCUSED" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_HOVERED" value="#00000000"/>
</attributes>
</scheme>
25 changes: 23 additions & 2 deletions src/main/resources/themes/vitesse.dark.soft.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@
<option name="FOREGROUND" value="#cb7676"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_CALL">
<option name="DEFAULT_FUNCTION_DECLARATION">
<value>
<option name="FOREGROUND" value="#80a665"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_DECLARATION">
<option name="DEFAULT_FUNCTION_CALL">
<value>
<option name="FOREGROUND" value="#80a665"/>
</value>
Expand Down Expand Up @@ -454,5 +454,26 @@
<option name="EFFECT_TYPE" value="1"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT">
<value>
<option name="FOREGROUND" value="#666666"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_CURRENT">
<value>
<option name="FOREGROUND" value="#666666"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_HIGHLIGHTED">
<value>
<option name="FOREGROUND" value="#666666"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_REFACTORING_SETTINGS_DEFAULT" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_FOCUSED" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_HOVERED" value="#00000000"/>
</attributes>
</scheme>
25 changes: 23 additions & 2 deletions src/main/resources/themes/vitesse.dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@
<option name="FOREGROUND" value="#cb7676"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_CALL">
<option name="DEFAULT_FUNCTION_DECLARATION">
<value>
<option name="FOREGROUND" value="#80a665"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_DECLARATION">
<option name="DEFAULT_FUNCTION_CALL">
<value>
<option name="FOREGROUND" value="#80a665"/>
</value>
Expand Down Expand Up @@ -454,5 +454,26 @@
<option name="EFFECT_TYPE" value="1"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT">
<value>
<option name="FOREGROUND" value="#666666"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_CURRENT">
<value>
<option name="FOREGROUND" value="#666666"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_HIGHLIGHTED">
<value>
<option name="FOREGROUND" value="#666666"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_REFACTORING_SETTINGS_DEFAULT" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_FOCUSED" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_HOVERED" value="#00000000"/>
</attributes>
</scheme>
25 changes: 23 additions & 2 deletions src/main/resources/themes/vitesse.light.soft.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@
<option name="FOREGROUND" value="#ab5959"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_CALL">
<option name="DEFAULT_FUNCTION_DECLARATION">
<value>
<option name="FOREGROUND" value="#59873a"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_DECLARATION">
<option name="DEFAULT_FUNCTION_CALL">
<value>
<option name="FOREGROUND" value="#59873a"/>
</value>
Expand Down Expand Up @@ -454,5 +454,26 @@
<option name="EFFECT_TYPE" value="1"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT">
<value>
<option name="FOREGROUND" value="#999999"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_CURRENT">
<value>
<option name="FOREGROUND" value="#999999"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_HIGHLIGHTED">
<value>
<option name="FOREGROUND" value="#999999"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_REFACTORING_SETTINGS_DEFAULT" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_FOCUSED" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_HOVERED" value="#00000000"/>
</attributes>
</scheme>
25 changes: 23 additions & 2 deletions src/main/resources/themes/vitesse.light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@
<option name="FOREGROUND" value="#ab5959"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_CALL">
<option name="DEFAULT_FUNCTION_DECLARATION">
<value>
<option name="FOREGROUND" value="#59873a"/>
</value>
</option>
<option name="DEFAULT_FUNCTION_DECLARATION">
<option name="DEFAULT_FUNCTION_CALL">
<value>
<option name="FOREGROUND" value="#59873a"/>
</value>
Expand Down Expand Up @@ -454,5 +454,26 @@
<option name="EFFECT_TYPE" value="1"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT">
<value>
<option name="FOREGROUND" value="#999999"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_CURRENT">
<value>
<option name="FOREGROUND" value="#999999"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_PARAMETER_HINT_HIGHLIGHTED">
<value>
<option name="FOREGROUND" value="#999999"/>
<option name="BACKGROUND" value="#00000000"/>
</value>
</option>
<option name="INLINE_REFACTORING_SETTINGS_DEFAULT" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_FOCUSED" value="#00000000"/>
<option name="INLINE_REFACTORING_SETTINGS_HOVERED" value="#00000000"/>
</attributes>
</scheme>

0 comments on commit ce15921

Please sign in to comment.