Settings

Theme

Show HN: I built a web app to generate Emacs and Vim themes from VSCode theme

nice.github.io

4 points by pai 3 years ago · 5 comments · 1 min read

Reader

Screenshots: https://nice.github.io/themeforge/screenshots/

Website: https://nice.github.io/themeforge

Source: https://github.com/nice/themeforge

Written in Vanilla JS, generation happens entirely in browser.

Automatically adds some default faces for few Emacs packages.

Vim version also comes with 256 color support for terminals.

Feedback is much appreciated. Thanks

suprjami 3 years ago

I've tried three different themes, your website says the JSON is invalid for every one.

- Official Solarized Dark: https://github.com/microsoft/vscode/blob/main/extensions/the...

- Better Solarized Dark: https://github.com/edheltzel/vscode-better-solarized/blob/ma...

- This one: https://github.com/braver/vscode-solarized/blob/master/theme...

  • paiOP 3 years ago

    Both first and second links contained comments in JSON, which is invalid.

    I have now added fix to strip the comments, it should work now.

    The last link does not have bare minimum requirement of a background color, see FAQ point 4: https://nice.github.io/themeforge/faq/#happy-little-accident...

    Thanks for reporting.

    • suprjami 3 years ago

      Cool, thanks for the quick response!

      Note the first link is the official VSC repo, nothing in there should fail. Can you automate testing of every theme shipped with Code? That would seem to be a good first step.

      It might also be helpful to expand your error messages more. Your audience is developers here. Even if I'm not a JSON genius I can still read an error message and try to fix things myself.

      • paiOP 3 years ago

        Just because it is in the official VSC repo does not necessarily make it right, it is clearly an invalid JSON file and the error message is displayed.

        Showing the exact line number of the error is beyond this project's scope for now.

        I'm currently using https://www.npmjs.com/package/strip-json-comments to remove the comments if any.

        There are many online linters available, please check https://jsonlint.com/

        • suprjami 3 years ago

          Welcome to Microsoft, where standards and interoperability are a vague suggestion.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection