colors, autoclose for '"'

pull/1814/head
lianahus 3 years ago
parent c89ab1ec7e
commit f90ebc380b
  1. 8
      apps/remix-ide/src/assets/css/themes/remix-black_undtds.css
  2. 6
      apps/remix-ide/src/assets/css/themes/remix-candy_ikhg4m.css
  3. 6
      apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css
  4. 2
      apps/remix-ide/src/assets/css/themes/remix-light_powaqg.css
  5. 6
      apps/remix-ide/src/assets/css/themes/remix-midcentury_hrzph3.css
  6. 36
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx
  7. 2
      libs/remix-ui/editor/src/lib/syntax.ts

@ -3,11 +3,11 @@
--blue: #28282D;
--indigo: #6610f2;
--purple: #9e77f6;
--pink: #e83e8c;
--pink: #f38abb;
--red: #823a3a;
--orange: #8a5026;
--orange: #e46b15;
--yellow: #ffc107;
--green: #366a57;
--green: #065337;
--teal: #20c997;
--cyan: #053c64;
--white: #d5d5d5;
@ -17,7 +17,7 @@
--secondary: #3d3e44;
--success: #366a57;
--info: #086CB5;
--warning: #8a5026;
--warning: #c26829;
--danger: #823a3a;
--light: #1f2020;
--dark: #1a1a1a;

@ -5,8 +5,8 @@
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--green: #28a745;
--yellow: #cdae02;
--green: #0c8a29;
--teal: #20c997;
--cyan: #17a2b8;
--white: #fff;
@ -16,7 +16,7 @@
--secondary: #e2f5f2;
--success: #24b882;
--info: #69c7e9;
--warning: #fbdf9f;
--warning: #fabe33;
--danger: #f80b0b;
--light: #fff;
--dark: #645fb5;

@ -3,11 +3,11 @@
--blue: #007aa6;
--indigo: #6610f2;
--purple: #9e77f6;
--pink: #e83e8c;
--pink: #f38abb;
--red: #b84040;
--orange: #c97539;
--orange: #e46b15;
--yellow: #ffc107;
--green: #32ba89;
--green: #219451;
--teal: #20c997;
--cyan: #355f7d;
--white: #fff;

@ -5,7 +5,7 @@
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--yellow: #cdae02;
--green: #28a745;
--teal: #20c997;
--cyan: #17a2b8;

@ -4,8 +4,8 @@
--purple: #6f42c1;
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--orange: #fd7e17;
--yellow: #cdae02;
--green: #28a745;
--teal: #20c997;
--cyan: #17a2b8;
@ -16,7 +16,7 @@
--secondary: #e2f5f2;
--success: #01670f;
--info: #69c7e9;
--warning: #edc464;
--warning: #f5ba30;
--danger: #E64F29;
--light: #eeede9;
--dark: #01414E;

@ -102,9 +102,11 @@ export const EditorUI = (props: EditorUIProps) => {
const yellowColor = formatColor('--yellow')
const pinkColor = formatColor('--pink')
const locationColor = '#9e7e08'
const purpleColor = formatColor('--purple')
//const purpleColor = formatColor('--purple')
const dangerColor = formatColor('--danger')
const greenColor = formatColor('--green')
const orangeColor = formatColor('--orange')
const grayColor = formatColor('--gray')
monaco.editor.defineTheme(themeName, {
base: themeType,
@ -138,19 +140,19 @@ export const EditorUI = (props: EditorUIProps) => {
// specials
{ token: 'keyword.super', foreground: infoColor },
{ token: 'keyword.this', foreground: infoColor },
{ token: 'keyword.virtual', foreground: infoColor },
// for state variables
{ token: 'keyword.constants', foreground: warningColor },
{ token: 'keyword.override', foreground: warningColor },
{ token: 'keyword.immutable', foreground: warningColor },
{ token: 'keyword.constants', foreground: grayColor },
{ token: 'keyword.override', foreground: grayColor },
{ token: 'keyword.immutable', foreground: grayColor },
// data location
{ token: 'keyword.memory', foreground: locationColor },
{ token: 'keyword.storage', foreground: locationColor },
{ token: 'keyword.calldata', foreground: locationColor },
// for functions and modifiers
{ token: 'keyword.virtual', foreground: purpleColor },
// for Events
{ token: 'keyword.indexed', foreground: yellowColor },
@ -176,15 +178,23 @@ export const EditorUI = (props: EditorUIProps) => {
{ token: 'keyword.constructor', foreground: pinkColor },
// identifiers
{ token: 'keyword.identifier', foreground: purpleColor },
{ token: 'keyword.for', foreground: purpleColor },
{ token: 'keyword.if', foreground: purpleColor },
{ token: 'keyword.else', foreground: purpleColor },
{ token: 'keyword.else', foreground: purpleColor },
{ token: 'keyword.else', foreground: purpleColor },
{ token: 'keyword.identifier', foreground: warningColor },
{ token: 'keyword.for', foreground: warningColor },
{ token: 'keyword.break', foreground: warningColor },
{ token: 'keyword.continue', foreground: warningColor },
{ token: 'keyword.while', foreground: warningColor },
{ token: 'keyword.do', foreground: warningColor },
{ token: 'keyword.if', foreground: yellowColor },
{ token: 'keyword.else', foreground: yellowColor },
{ token: 'keyword.throw', foreground: orangeColor },
{ token: 'keyword.catch', foreground: orangeColor },
{ token: 'keyword.try', foreground: orangeColor },
// returns
{ token: 'keyword.returns', foreground: greenColor }
{ token: 'keyword.returns', foreground: greenColor },
{ token: 'keyword.return', foreground: greenColor }
],
colors: {

@ -12,6 +12,7 @@ export const conf = {
],
autoClosingPairs: [
{ open: '"', close: '"', notIn: ['string', 'comment'] },
{ open: "'", close: "'", notIn: ['string', 'comment'] },
{ open: '{', close: '}', notIn: ['string', 'comment'] },
{ open: '[', close: ']', notIn: ['string', 'comment'] },
{ open: '(', close: ')', notIn: ['string', 'comment'] }
@ -1224,7 +1225,6 @@ export const language = {
'internal',
'indexed',
'anonymous',
'isOwner',
'view',
'pure',
'inherited',

Loading…
Cancel
Save