Skip to content

Commit

Permalink
chore: updates (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks authored Jan 13, 2024
1 parent 962cc86 commit 524d439
Show file tree
Hide file tree
Showing 22 changed files with 786 additions and 3,502 deletions.
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Extension",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"]
}
]
}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 0.11.0

- Refreshed colors
- Sync Moonlight editor UI colors with Moonlight II; both now actively supported
- Fix inlay hint color tint
- Enable semantic highlighting by default
- [Moonlight II] Make string interpolation punctuation red

## 0.10.6

- Add semantic colors for Go (#37)
- Fix selection and border color

## 0.10.5

- Change debugging background color for better contrast (#23)
- Make borders in the sideBarSections and terminal split more visible (#32)

## 0.10.4

### Moonlight II
Expand Down
34 changes: 5 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Moonlight 🌌

<img src="https://github.com/atomiks/moonlight-vscode-theme/raw/master/preview.png" alt="Preview">
<img src="https://github.com/atomiks/moonlight-vscode-theme/raw/master/preview.webp" alt="Preview">

## Variants

- Moonlight (regular and italics) (legacy)
- Moonlight II (regular and italics) (**recommended**)
- Moonlight (regular and italics)
- Moonlight II (regular and italics)

## Installation

Expand All @@ -19,32 +19,8 @@

## Semantic highlighting

Moonlight does not enable semantic highlighting by default, but it can be enabled in settings:
Semantic highlighting is enabled by default. To disable it, add the following to your settings.json:

```json
"editor.semanticHighlighting.enabled": true
"editor.semanticHighlighting.enabled": false
```

## How do I enable the glow seen in the screenshot?

[Read instructions here](https://github.com/robb0wen/synthwave-vscode/blob/ec7e97eba96febbcf069256a6513ecedd0b187ae/README.md#to-enable-the-glow).

`moonlight.css` stylesheet:

```css
.mtk11 {
color: #91bbff;
text-shadow: 0 0 10px #2f36ff, 0 0 22px #9d91ff, 0 0 2px black;
}

.mtk12 {
color: #67d2ff;
text-shadow: 0 0 15px #12baff, 0 0 2px black;
}
```

⚠️ The `mtk` token numbers (11 and 12 above – which represent the two function colors) can change when the theme or VS Code version is updated, causing incorrect colors. When new releases arrive, make sure to visit the README for the updated stylesheet or make an issue if they change due to VS Code – I will update them accordingly.

## Related Packages

- [github-moonlight](https://github.com/Brettm12345/github-moonlight)
98 changes: 98 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"root": ".",
"enabled": true,
"clientKind": "git"
},
"files": {
"include": [
"./**/*.ts",
"./**/*.js",
"./**/*.cjs",
"./**/*.mjs",
"./**/*.jsx",
"./**/*.tsx",
"./**/*.d.ts",
"./**/*.json",
"./**/*.jsonc"
],
"ignore": ["node_modules", "dist", "_"],
"ignoreUnknown": true
},
"organizeImports": {
"enabled": false
},
"formatter": {
"enabled": true,
"lineWidth": 80,
"indentWidth": 2,
"indentStyle": "space",
"formatWithErrors": true,
"include": [
"./**/*.ts",
"./**/*.js",
"./**/*.cjs",
"./**/*.mjs",
"./**/*.jsx",
"./**/*.tsx",
"./**/*.d.ts",
"./**/*.json",
"./**/*.jsonc"
]
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"style": {
"useBlockStatements": "off",
"useSelfClosingElements": "off",
"noUnusedTemplateLiteral": "off"
},
"a11y": { "noSvgWithoutTitle": "off" },
"nursery": { "noUnusedImports": "off" },
"performance": { "noAccumulatingSpread": "off" },
"correctness": { "noUndeclaredVariables": "off" },
"suspicious": {
"noExplicitAny": "off",
"noEmptyInterface": "off",
"noConfusingVoidType": "off"
},
"complexity": {
"useLiteralKeys": "off",
"noUselessFragments": "off",
"noBannedTypes": "off",
"noForEach": "off"
},
"security": {
"noDangerouslySetInnerHtml": "off"
}
}
},
"json": {
"parser": {
"allowComments": true
},
"formatter": {
"enabled": true
}
},
"javascript": {
"parser": {
"unsafeParameterDecoratorsEnabled": true
},
"formatter": {
"enabled": true,
"lineWidth": 80,
"indentWidth": 2,
"indentStyle": "space",
"quoteStyle": "single",
"trailingComma": "all",
"semicolons": "always",
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"arrowParentheses": "always"
}
}
}
22 changes: 0 additions & 22 deletions build.js

This file was deleted.

Binary file added bun.lockb
Binary file not shown.
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 10 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@
"name": "moonlight",
"displayName": "Moonlight",
"description": "A VS Code theme with bubblegum colors on a moonlit background.",
"version": "0.10.6",
"version": "0.11.0",
"publisher": "atomiks",
"license": "SEE LICENSE IN LICENSE.md",
"type": "module",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/atomiks/moonlight-vscode-theme"
},
"keywords": [
"Theme",
"Dark Theme",
"Moonlight",
"Night Theme"
],
"keywords": ["Theme", "Dark Theme", "Moonlight", "Night Theme"],
"scripts": {
"publish": "vsce publish",
"build": "node build"
"build": "bun scripts/build.ts",
"format": "npx @biomejs/biome format **/*.{ts,js} --write"
},
"galleryBanner": {
"color": "#061526",
Expand All @@ -26,9 +23,7 @@
"engines": {
"vscode": "^1.17.0"
},
"categories": [
"Themes"
],
"categories": ["Themes"],
"icon": "icon.png",
"contributes": {
"themes": [
Expand All @@ -55,7 +50,8 @@
]
},
"devDependencies": {
"prettier": "^1.19.1",
"vsce": "^1.71.0"
"@biomejs/biome": "^1.5.1",
"prettier": "^3.1.1",
"vsce": "^2.15.0"
}
}
Binary file removed preview.png
Binary file not shown.
Binary file added preview.webp
Binary file not shown.
23 changes: 23 additions & 0 deletions scripts/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import fs from 'node:fs';
import { colors } from '../src/colors';
import ui from '../src/ui.json';

['moonlight', 'moonlight-ii'].forEach((theme) => {
let srcString = fs.readFileSync(`./src/${theme}.json`, 'utf-8');

const json = JSON.parse(srcString);
Object.assign(json, { colors: ui.colors });
srcString = JSON.stringify(json, null, 2);

Object.entries(colors).forEach(([colorVar, hexStr]) => {
srcString = srcString.replace(new RegExp(`\\{${colorVar}}`, 'g'), hexStr);
});

['normal', 'italic'].forEach((style) => {
const builtString = srcString.replace(/{fontStyle}/g, style);
fs.writeFileSync(
`./themes/${theme}${style === 'italic' ? '-italic.json' : '.json'}`,
builtString,
);
});
});
31 changes: 0 additions & 31 deletions src/colors.js

This file was deleted.

35 changes: 35 additions & 0 deletions src/colors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export const colors = {
lightRed: '#ff98a4',
red: '#ff757f',
darkRed: '#ff5370',
lightOrange: '#f8b576',
orange: '#ff966c',
darkOrange: '#fc7b7b',
yellow: '#ffc777',
green: '#c3e88d',
lightTeal: '#7af8ca',
teal: '#3ad7c7',
lightCyan: '#b4f9f8',
cyan: '#78dbff',
sky: '#60bdff',
blue: '#7cafff',
darkBlue: '#3d6fe0',
darkestBlue: '#3b63cf',
indigo: '#af9fff',
purple: '#c4a2ff',
pink: '#fca7ea',
darkPink: '#fd8aca',
saturatedGray: '#7a88cf',
desaturatedGray: '#979bb6',
gray11: '#d5def8',
gray10: '#c8d3f5',
gray9: '#b4c2f0',
gray8: '#a9b8e8',
gray7: '#828bb8',
gray6: '#444a73',
gray5: '#2f334d',
gray4: '#222436',
gray3: '#1e2030',
gray2: '#191a2a',
gray1: '#131421',
} as const;
Loading

0 comments on commit 524d439

Please sign in to comment.