├── .gitattributes ├── .gitignore ├── .vscode ├── LICENSE └── launch.json ├── .vscodeignore ├── CHANGELOG.md ├── README.md ├── demo ├── .editorconfig ├── .vscode │ └── settings.json ├── checkbox_with_label.test.js ├── clojure.clj ├── clojurescript.cljs ├── cplusplus-header.h ├── cplusplus-source.cc ├── css.css ├── elm.elm ├── html.html ├── issue-91.jsx ├── issue-91.tsx ├── js.js ├── json.json ├── markdown.md ├── php.php ├── powershell.ps1 ├── pug.pug ├── python.py ├── react.js ├── ruby.rb ├── statelessfunctionalreact.js ├── stylus.styl ├── tsx.tsx ├── vuedemo.vue └── yml.yml ├── inbedby7.png ├── js-sample.png ├── package.json ├── powershell.png ├── react-sample.png ├── sleep-icon.jpg ├── themes └── in-bed-by-7.json ├── vsc-extension-quickstart.md └── vue.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behavior to automatically normalize line endings. 2 | * text=auto 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix 3 | -------------------------------------------------------------------------------- /.vscode/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Sarah Drasner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "In Bed by 7pm" extension are be documented in this file. 4 | 5 | ## 0.4.0 6 | 7 | - Fix highlighting 8 | - Work on JSON keys 9 | 10 | ## 0.3.4 11 | 12 | - Fix tab/inactive tab 13 | - Work on string and key 14 | - Update highlighting 15 | 16 | ## 0.3.3 17 | 18 | - Welcome screen improvements 19 | - Fix terminal red 20 | - Work on ruby highlighting 21 | - Better scrollbar visibility 22 | 23 | ## 0.3.2 24 | 25 | - Markdown string 26 | - Change default green for file change and terminal 27 | 28 | ## 0.3.1 29 | 30 | - Work on highlighting more 31 | 32 | ## 0.3.0 33 | 34 | - Fix selections intensity and highlight 35 | - Fix borders 36 | 37 | ## 0.2.0 38 | 39 | - Update colors for all languages 40 | - Add in more screenshots 41 | 42 | ## 0.1.2 43 | 44 | - Update repo link 45 | 46 | ## 0.1.1 47 | 48 | - Update keywords 49 | 50 | ## 0.1.0 51 | 52 | - Update icon 53 | 54 | ## 0.0.1 55 | 56 | - Initial release 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # In Bed By 7pm 🌆 2 | 3 | [![Version](https://vsmarketplacebadge.apphb.com/version/sdras.inbedby7pm.svg)](https://aka.ms/inbedby7pm) 4 | [![Downloads](https://img.shields.io/vscode-marketplace/r/sdras.inbedby7pm.svg)](https://aka.ms/inbedby7pm) 5 | 6 | My first VS Code Theme was [Night Owl](https://github.com/sdras/night-owl-vscode-theme), and I got a request for a new kind of theme for other folks: [In Bed By 7pm](https://twitter.com/toddmorey/status/1309982499003564034?s=20). 7 | 8 | About this theme, and some of the considerations made while creating it (as well as _how_ to create it should you want to make your own): [https://css-tricks.com/creating-a-vs-code-theme/](https://css-tricks.com/creating-a-vs-code-theme/) 9 | 10 | ![vue](vue.png) 11 | ![react](react-sample.png) 12 | ![javascript](js-sample.png) 13 | ![powershell](powershell.png) 14 | 15 | # Installation 16 | 17 | 1. Install [Visual Studio Code](https://code.visualstudio.com/) 18 | 2. Launch Visual Studio Code 19 | 3. Choose **Extensions** from menu 20 | 4. Search for `in bed by 7pm` 21 | 5. Click **Install** to install it 22 | 6. Click **Reload** to reload the Code 23 | 7. From the menu bar click: Code > Preferences > Color Theme > **In Bed By 7pm** 24 | 25 | Suggestions and contributions welcome :) 26 | -------------------------------------------------------------------------------- /demo/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | max_line_length = off 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /demo/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.linting.enabled": false 3 | } -------------------------------------------------------------------------------- /demo/checkbox_with_label.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import * as TestUtils from 'react-dom/test-utils'; 4 | import CheckboxWithLabel from '../CheckboxWithLabel'; 5 | 6 | it('CheckboxWithLabel changes the text after click', () => { 7 | // Render a checkbox with label in the document 8 | const checkbox = TestUtils.renderIntoDocument( 9 | 10 | ) 11 | 12 | const checkboxNode = ReactDOM.findDOMNode(checkbox) 13 | 14 | // Verify that it's Off by default 15 | expect(checkboxNode.textContent).toEqual('Off') 16 | 17 | // Simulate a click and verify that it is now On 18 | TestUtils.Simulate.change( 19 | TestUtils.findRenderedDOMComponentWithTag(checkbox, 'input') 20 | ) 21 | expect(checkboxNode.textContent).toEqual('On') 22 | }) -------------------------------------------------------------------------------- /demo/clojure.clj: -------------------------------------------------------------------------------- 1 | (ns hello.world.clojure) 2 | 3 | (defn sum [& numbers] 4 | (if (empty? numbers) 5 | 0 6 | (reduce + 0 numbers))) 7 | 8 | (defn print-name [{:keys [first last age]}] 9 | (println (str "Your name is " first " " last " and you are " age " years old."))) 10 | 11 | (defn set-age [person new-age] 12 | (assoc person :age new-age)) 13 | 14 | (defn hello-world [] 15 | (let [john {:first "John" :last "Smith" :age 65} 16 | jack {:first "Jack" :last "Road" :age 76} 17 | george {:first "George" :last "Way" :age 23} 18 | george-junior (assoc george :age 6) 19 | all-persons [john jack george george-junior]] 20 | 21 | (doseq [person all-persons] 22 | (print-name person)) 23 | 24 | (println (str "Total age is: " (apply sum (map :age all-persons)))))) 25 | 26 | (hello-world) 27 | -------------------------------------------------------------------------------- /demo/clojurescript.cljs: -------------------------------------------------------------------------------- 1 | (ns hello.world.clojurescript 2 | (:require [reagent.core :as r]) 3 | 4 | (def counter (r/atom 0)) 5 | (def text-component-style {:background-color :grey 6 | :border "1px solid black" 7 | :padding "5px"}) 8 | 9 | (defn counter-clicked [] 10 | (.log js/console "You clicked the counter component.") 11 | (swap! counter inc)) 12 | 13 | (defn text-counter [text] 14 | [:div {:on-click counter-clicked 15 | :style text-component-style}) 16 | (str text @counter]) 17 | 18 | (defn main-component [] 19 | [:div 20 | [:p {:style {:color :red}} "Hello world! Click the element below:"] 21 | [text-counter "Clicked: "]]) 22 | -------------------------------------------------------------------------------- /demo/cplusplus-header.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 the V8 project authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef V8_API_H_ 6 | #define V8_API_H_ 7 | 8 | #include "include/v8-testing.h" 9 | #include "src/contexts.h" 10 | #include "src/debug/debug-interface.h" 11 | #include "src/detachable-vector.h" 12 | #include "src/heap/factory.h" 13 | #include "src/isolate.h" 14 | #include "src/objects.h" 15 | #include "src/objects/bigint.h" 16 | #include "src/objects/js-collection.h" 17 | #include "src/objects/js-generator.h" 18 | #include "src/objects/js-promise.h" 19 | #include "src/objects/js-proxy.h" 20 | #include "src/objects/module.h" 21 | #include "src/objects/shared-function-info.h" 22 | 23 | #include "src/objects/templates.h" 24 | 25 | namespace v8 { 26 | 27 | // Constants used in the implementation of the API. The most natural thing 28 | // would usually be to place these with the classes that use them, but 29 | // we want to keep them out of v8.h because it is an externally 30 | // visible file. 31 | class Consts { 32 | public: 33 | enum TemplateType { 34 | FUNCTION_TEMPLATE = 0, 35 | OBJECT_TEMPLATE = 1 36 | }; 37 | }; 38 | 39 | template 40 | inline T ToCData(v8::internal::Object* obj); 41 | 42 | template <> 43 | inline v8::internal::Address ToCData(v8::internal::Object* obj); 44 | 45 | template 46 | inline v8::internal::Handle FromCData( 47 | v8::internal::Isolate* isolate, T obj); 48 | 49 | template <> 50 | inline v8::internal::Handle FromCData( 51 | v8::internal::Isolate* isolate, v8::internal::Address obj); 52 | 53 | class ApiFunction { 54 | public: 55 | explicit ApiFunction(v8::internal::Address addr) : addr_(addr) { } 56 | v8::internal::Address address() { return addr_; } 57 | private: 58 | v8::internal::Address addr_; 59 | }; 60 | 61 | 62 | 63 | class RegisteredExtension { 64 | public: 65 | explicit RegisteredExtension(Extension* extension); 66 | static void Register(RegisteredExtension* that); 67 | static void UnregisterAll(); 68 | Extension* extension() { return extension_; } 69 | RegisteredExtension* next() { return next_; } 70 | static RegisteredExtension* first_extension() { return first_extension_; } 71 | private: 72 | Extension* extension_; 73 | RegisteredExtension* next_; 74 | static RegisteredExtension* first_extension_; 75 | }; 76 | 77 | #define OPEN_HANDLE_LIST(V) \ 78 | V(Template, TemplateInfo) \ 79 | V(FunctionTemplate, FunctionTemplateInfo) \ 80 | V(ObjectTemplate, ObjectTemplateInfo) \ 81 | V(Signature, FunctionTemplateInfo) \ 82 | V(AccessorSignature, FunctionTemplateInfo) \ 83 | V(Data, Object) \ 84 | V(RegExp, JSRegExp) \ 85 | V(Object, JSReceiver) \ 86 | V(Array, JSArray) \ 87 | V(Map, JSMap) \ 88 | V(Set, JSSet) \ 89 | V(ArrayBuffer, JSArrayBuffer) \ 90 | V(ArrayBufferView, JSArrayBufferView) \ 91 | V(TypedArray, JSTypedArray) \ 92 | V(Uint8Array, JSTypedArray) \ 93 | V(Uint8ClampedArray, JSTypedArray) \ 94 | V(Int8Array, JSTypedArray) \ 95 | V(Uint16Array, JSTypedArray) \ 96 | V(Int16Array, JSTypedArray) \ 97 | V(Uint32Array, JSTypedArray) \ 98 | V(Int32Array, JSTypedArray) \ 99 | V(Float32Array, JSTypedArray) \ 100 | V(Float64Array, JSTypedArray) \ 101 | V(DataView, JSDataView) \ 102 | V(SharedArrayBuffer, JSArrayBuffer) \ 103 | V(Name, Name) \ 104 | V(String, String) \ 105 | V(Symbol, Symbol) \ 106 | V(Script, JSFunction) \ 107 | V(UnboundModuleScript, SharedFunctionInfo) \ 108 | V(UnboundScript, SharedFunctionInfo) \ 109 | V(Module, Module) \ 110 | V(Function, JSReceiver) \ 111 | V(Message, JSMessageObject) \ 112 | V(Context, Context) \ 113 | V(External, Object) \ 114 | V(StackTrace, FixedArray) \ 115 | V(StackFrame, StackFrameInfo) \ 116 | V(Proxy, JSProxy) \ 117 | V(debug::GeneratorObject, JSGeneratorObject) \ 118 | V(debug::Script, Script) \ 119 | V(debug::WeakMap, JSWeakMap) \ 120 | V(Promise, JSPromise) \ 121 | V(Primitive, Object) \ 122 | V(PrimitiveArray, FixedArray) \ 123 | V(BigInt, BigInt) \ 124 | V(ScriptOrModule, Script) 125 | 126 | class Utils { 127 | public: 128 | static inline bool ApiCheck(bool condition, 129 | const char* location, 130 | const char* message) { 131 | if (!condition) Utils::ReportApiFailure(location, message); 132 | return condition; 133 | } 134 | static void ReportOOMFailure(v8::internal::Isolate* isolate, 135 | const char* location, bool is_heap_oom); 136 | 137 | static inline Local ToLocal( 138 | v8::internal::Handle obj); 139 | static inline Local ToLocal( 140 | v8::internal::Handle obj); 141 | static inline Local ToLocal( 142 | v8::internal::Handle obj); 143 | static inline Local ToLocal( 144 | v8::internal::Handle obj); 145 | static inline Local ToLocal( 146 | v8::internal::Handle obj); 147 | static inline Local ToLocal( 148 | v8::internal::Handle obj); 149 | static inline Local ToLocal( 150 | v8::internal::Handle obj); 151 | static inline Local ToLocal( 152 | v8::internal::Handle obj); 153 | static inline Local ToLocal( 154 | v8::internal::Handle obj); 155 | static inline Local ToLocal( 156 | v8::internal::Handle obj); 157 | static inline Local ToLocal( 158 | v8::internal::Handle obj); 159 | static inline Local ToLocal( 160 | v8::internal::Handle obj); 161 | static inline Local ToLocal( 162 | v8::internal::Handle obj); 163 | static inline Local ToLocal( 164 | v8::internal::Handle obj); 165 | static inline Local ToLocal( 166 | v8::internal::Handle obj); 167 | static inline Local ToLocal( 168 | v8::internal::Handle obj); 169 | static inline Local ToLocal( 170 | v8::internal::Handle obj); 171 | static inline Local ToLocal( 172 | v8::internal::Handle obj); 173 | static inline Local ToLocalUint8Array( 174 | v8::internal::Handle obj); 175 | static inline Local ToLocalUint8ClampedArray( 176 | v8::internal::Handle obj); 177 | static inline Local ToLocalInt8Array( 178 | v8::internal::Handle obj); 179 | static inline Local ToLocalUint16Array( 180 | v8::internal::Handle obj); 181 | static inline Local ToLocalInt16Array( 182 | v8::internal::Handle obj); 183 | static inline Local ToLocalUint32Array( 184 | v8::internal::Handle obj); 185 | static inline Local ToLocalInt32Array( 186 | v8::internal::Handle obj); 187 | static inline Local ToLocalFloat32Array( 188 | v8::internal::Handle obj); 189 | static inline Local ToLocalFloat64Array( 190 | v8::internal::Handle obj); 191 | static inline Local ToLocalBigInt64Array( 192 | v8::internal::Handle obj); 193 | static inline Local ToLocalBigUint64Array( 194 | v8::internal::Handle obj); 195 | 196 | static inline Local ToLocalShared( 197 | v8::internal::Handle obj); 198 | 199 | static inline Local MessageToLocal( 200 | v8::internal::Handle obj); 201 | static inline Local PromiseToLocal( 202 | v8::internal::Handle obj); 203 | static inline Local StackTraceToLocal( 204 | v8::internal::Handle obj); 205 | static inline Local StackFrameToLocal( 206 | v8::internal::Handle obj); 207 | static inline Local NumberToLocal( 208 | v8::internal::Handle obj); 209 | static inline Local IntegerToLocal( 210 | v8::internal::Handle obj); 211 | static inline Local Uint32ToLocal( 212 | v8::internal::Handle obj); 213 | static inline Local ToLocal( 214 | v8::internal::Handle obj); 215 | static inline Local ToLocal( 216 | v8::internal::Handle obj); 217 | static inline Local ToLocal( 218 | v8::internal::Handle obj); 219 | static inline Local SignatureToLocal( 220 | v8::internal::Handle obj); 221 | static inline Local AccessorSignatureToLocal( 222 | v8::internal::Handle obj); 223 | static inline Local ExternalToLocal( 224 | v8::internal::Handle obj); 225 | static inline Local CallableToLocal( 226 | v8::internal::Handle obj); 227 | static inline Local ToLocalPrimitive( 228 | v8::internal::Handle obj); 229 | static inline Local ToLocal( 230 | v8::internal::Handle obj); 231 | static inline Local ScriptOrModuleToLocal( 232 | v8::internal::Handle obj); 233 | 234 | #define DECLARE_OPEN_HANDLE(From, To) \ 235 | static inline v8::internal::Handle \ 236 | OpenHandle(const From* that, bool allow_empty_handle = false); 237 | 238 | OPEN_HANDLE_LIST(DECLARE_OPEN_HANDLE) 239 | 240 | #undef DECLARE_OPEN_HANDLE 241 | 242 | template 243 | static inline Local Convert(v8::internal::Handle obj); 244 | 245 | template 246 | static inline v8::internal::Handle OpenPersistent( 247 | const v8::Persistent& persistent) { 248 | return v8::internal::Handle( 249 | reinterpret_cast(persistent.val_)); 250 | } 251 | 252 | template 253 | static inline v8::internal::Handle OpenPersistent( 254 | v8::Persistent* persistent) { 255 | return OpenPersistent(*persistent); 256 | } 257 | 258 | template 259 | static inline v8::internal::Handle OpenHandle(v8::Local handle) { 260 | return OpenHandle(*handle); 261 | } 262 | 263 | private: 264 | static void ReportApiFailure(const char* location, const char* message); 265 | }; 266 | 267 | 268 | template 269 | inline T* ToApi(v8::internal::Handle obj) { 270 | return reinterpret_cast(obj.location()); 271 | } 272 | 273 | template 274 | inline v8::Local ToApiHandle( 275 | v8::internal::Handle obj) { 276 | return Utils::Convert(obj); 277 | } 278 | 279 | 280 | template 281 | inline bool ToLocal(v8::internal::MaybeHandle maybe, 282 | Local* local) { 283 | v8::internal::Handle handle; 284 | if (maybe.ToHandle(&handle)) { 285 | *local = Utils::Convert(handle); 286 | return true; 287 | } 288 | return false; 289 | } 290 | 291 | namespace internal { 292 | 293 | class V8_EXPORT_PRIVATE DeferredHandles { 294 | public: 295 | ~DeferredHandles(); 296 | 297 | private: 298 | DeferredHandles(Object** first_block_limit, Isolate* isolate) 299 | : next_(nullptr), 300 | previous_(nullptr), 301 | first_block_limit_(first_block_limit), 302 | isolate_(isolate) { 303 | isolate->LinkDeferredHandles(this); 304 | } 305 | 306 | void Iterate(RootVisitor* v); 307 | 308 | std::vector blocks_; 309 | DeferredHandles* next_; 310 | DeferredHandles* previous_; 311 | Object** first_block_limit_; 312 | Isolate* isolate_; 313 | 314 | friend class HandleScopeImplementer; 315 | friend class Isolate; 316 | }; 317 | 318 | 319 | // This class is here in order to be able to declare it a friend of 320 | // HandleScope. Moving these methods to be members of HandleScope would be 321 | // neat in some ways, but it would expose internal implementation details in 322 | // our public header file, which is undesirable. 323 | // 324 | // An isolate has a single instance of this class to hold the current thread's 325 | // data. In multithreaded V8 programs this data is copied in and out of storage 326 | // so that the currently executing thread always has its own copy of this 327 | // data. 328 | class HandleScopeImplementer { 329 | public: 330 | explicit HandleScopeImplementer(Isolate* isolate) 331 | : isolate_(isolate), 332 | microtask_context_(nullptr), 333 | spare_(nullptr), 334 | call_depth_(0), 335 | microtasks_depth_(0), 336 | microtasks_suppressions_(0), 337 | entered_contexts_count_(0), 338 | entered_context_count_during_microtasks_(0), 339 | #ifdef DEBUG 340 | debug_microtasks_depth_(0), 341 | #endif 342 | microtasks_policy_(v8::MicrotasksPolicy::kAuto), 343 | last_handle_before_deferred_block_(nullptr) { 344 | } 345 | 346 | ~HandleScopeImplementer() { 347 | DeleteArray(spare_); 348 | } 349 | 350 | // Threading support for handle data. 351 | static int ArchiveSpacePerThread(); 352 | char* RestoreThread(char* from); 353 | char* ArchiveThread(char* to); 354 | void FreeThreadResources(); 355 | 356 | // Garbage collection support. 357 | void Iterate(v8::internal::RootVisitor* v); 358 | static char* Iterate(v8::internal::RootVisitor* v, char* data); 359 | 360 | inline internal::Object** GetSpareOrNewBlock(); 361 | inline void DeleteExtensions(internal::Object** prev_limit); 362 | 363 | // Call depth represents nested v8 api calls. 364 | inline void IncrementCallDepth() {call_depth_++;} 365 | inline void DecrementCallDepth() {call_depth_--;} 366 | inline bool CallDepthIsZero() { return call_depth_ == 0; } 367 | 368 | // Microtasks scope depth represents nested scopes controlling microtasks 369 | // invocation, which happens when depth reaches zero. 370 | inline void IncrementMicrotasksScopeDepth() {microtasks_depth_++;} 371 | inline void DecrementMicrotasksScopeDepth() {microtasks_depth_--;} 372 | inline int GetMicrotasksScopeDepth() { return microtasks_depth_; } 373 | 374 | // Possibly nested microtasks suppression scopes prevent microtasks 375 | // from running. 376 | inline void IncrementMicrotasksSuppressions() {microtasks_suppressions_++;} 377 | inline void DecrementMicrotasksSuppressions() {microtasks_suppressions_--;} 378 | inline bool HasMicrotasksSuppressions() { return !!microtasks_suppressions_; } 379 | 380 | #ifdef DEBUG 381 | // In debug we check that calls not intended to invoke microtasks are 382 | // still correctly wrapped with microtask scopes. 383 | inline void IncrementDebugMicrotasksScopeDepth() {debug_microtasks_depth_++;} 384 | inline void DecrementDebugMicrotasksScopeDepth() {debug_microtasks_depth_--;} 385 | inline bool DebugMicrotasksScopeDepthIsZero() { 386 | return debug_microtasks_depth_ == 0; 387 | } 388 | #endif 389 | 390 | inline void set_microtasks_policy(v8::MicrotasksPolicy policy); 391 | inline v8::MicrotasksPolicy microtasks_policy() const; 392 | 393 | inline void EnterContext(Handle context); 394 | inline void LeaveContext(); 395 | inline bool LastEnteredContextWas(Handle context); 396 | 397 | // Returns the last entered context or an empty handle if no 398 | // contexts have been entered. 399 | inline Handle LastEnteredContext(); 400 | 401 | inline void EnterMicrotaskContext(Handle context); 402 | inline void LeaveMicrotaskContext(); 403 | inline Handle MicrotaskContext(); 404 | inline bool MicrotaskContextIsLastEnteredContext() const { 405 | return microtask_context_ && 406 | entered_context_count_during_microtasks_ == entered_contexts_.size(); 407 | } 408 | 409 | inline void SaveContext(Context* context); 410 | inline Context* RestoreContext(); 411 | inline bool HasSavedContexts(); 412 | 413 | inline DetachableVector* blocks() { return &blocks_; } 414 | Isolate* isolate() const { return isolate_; } 415 | 416 | void ReturnBlock(Object** block) { 417 | DCHECK_NOT_NULL(block); 418 | if (spare_ != nullptr) DeleteArray(spare_); 419 | spare_ = block; 420 | } 421 | 422 | private: 423 | void ResetAfterArchive() { 424 | blocks_.detach(); 425 | entered_contexts_.detach(); 426 | saved_contexts_.detach(); 427 | microtask_context_ = nullptr; 428 | entered_context_count_during_microtasks_ = 0; 429 | spare_ = nullptr; 430 | last_handle_before_deferred_block_ = nullptr; 431 | call_depth_ = 0; 432 | } 433 | 434 | void Free() { 435 | DCHECK(blocks_.empty()); 436 | DCHECK(entered_contexts_.empty()); 437 | DCHECK(saved_contexts_.empty()); 438 | DCHECK(!microtask_context_); 439 | 440 | blocks_.free(); 441 | entered_contexts_.free(); 442 | saved_contexts_.free(); 443 | if (spare_ != nullptr) { 444 | DeleteArray(spare_); 445 | spare_ = nullptr; 446 | } 447 | DCHECK_EQ(call_depth_, 0); 448 | } 449 | 450 | void BeginDeferredScope(); 451 | DeferredHandles* Detach(Object** prev_limit); 452 | 453 | Isolate* isolate_; 454 | DetachableVector blocks_; 455 | // Used as a stack to keep track of entered contexts. 456 | DetachableVector entered_contexts_; 457 | // Used as a stack to keep track of saved contexts. 458 | DetachableVector saved_contexts_; 459 | Context* microtask_context_; 460 | Object** spare_; 461 | int call_depth_; 462 | int microtasks_depth_; 463 | int microtasks_suppressions_; 464 | size_t entered_contexts_count_; 465 | size_t entered_context_count_during_microtasks_; 466 | #ifdef DEBUG 467 | int debug_microtasks_depth_; 468 | #endif 469 | v8::MicrotasksPolicy microtasks_policy_; 470 | Object** last_handle_before_deferred_block_; 471 | // This is only used for threading support. 472 | HandleScopeData handle_scope_data_; 473 | 474 | void IterateThis(RootVisitor* v); 475 | char* RestoreThreadHelper(char* from); 476 | char* ArchiveThreadHelper(char* to); 477 | 478 | friend class DeferredHandles; 479 | friend class DeferredHandleScope; 480 | friend class HandleScopeImplementerOffsets; 481 | 482 | DISALLOW_COPY_AND_ASSIGN(HandleScopeImplementer); 483 | }; 484 | 485 | class HandleScopeImplementerOffsets { 486 | public: 487 | enum Offsets { 488 | kMicrotaskContext = offsetof(HandleScopeImplementer, microtask_context_), 489 | kEnteredContexts = offsetof(HandleScopeImplementer, entered_contexts_), 490 | kEnteredContextsCount = 491 | offsetof(HandleScopeImplementer, entered_contexts_count_), 492 | kEnteredContextCountDuringMicrotasks = offsetof( 493 | HandleScopeImplementer, entered_context_count_during_microtasks_) 494 | }; 495 | 496 | private: 497 | DISALLOW_IMPLICIT_CONSTRUCTORS(HandleScopeImplementerOffsets); 498 | }; 499 | 500 | const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page 501 | 502 | 503 | void HandleScopeImplementer::set_microtasks_policy( 504 | v8::MicrotasksPolicy policy) { 505 | microtasks_policy_ = policy; 506 | } 507 | 508 | 509 | v8::MicrotasksPolicy HandleScopeImplementer::microtasks_policy() const { 510 | return microtasks_policy_; 511 | } 512 | 513 | 514 | void HandleScopeImplementer::SaveContext(Context* context) { 515 | saved_contexts_.push_back(context); 516 | } 517 | 518 | 519 | Context* HandleScopeImplementer::RestoreContext() { 520 | Context* last_context = saved_contexts_.back(); 521 | saved_contexts_.pop_back(); 522 | return last_context; 523 | } 524 | 525 | 526 | bool HandleScopeImplementer::HasSavedContexts() { 527 | return !saved_contexts_.empty(); 528 | } 529 | 530 | 531 | void HandleScopeImplementer::EnterContext(Handle context) { 532 | entered_contexts_.push_back(*context); 533 | entered_contexts_count_ = entered_contexts_.size(); 534 | } 535 | 536 | void HandleScopeImplementer::LeaveContext() { 537 | entered_contexts_.pop_back(); 538 | entered_contexts_count_ = entered_contexts_.size(); 539 | } 540 | 541 | bool HandleScopeImplementer::LastEnteredContextWas(Handle context) { 542 | return !entered_contexts_.empty() && entered_contexts_.back() == *context; 543 | } 544 | 545 | void HandleScopeImplementer::EnterMicrotaskContext(Handle context) { 546 | DCHECK(!microtask_context_); 547 | microtask_context_ = *context; 548 | entered_context_count_during_microtasks_ = entered_contexts_.size(); 549 | } 550 | 551 | void HandleScopeImplementer::LeaveMicrotaskContext() { 552 | microtask_context_ = nullptr; 553 | entered_context_count_during_microtasks_ = 0; 554 | } 555 | 556 | // If there's a spare block, use it for growing the current scope. 557 | internal::Object** HandleScopeImplementer::GetSpareOrNewBlock() { 558 | internal::Object** block = 559 | (spare_ != nullptr) ? spare_ 560 | : NewArray(kHandleBlockSize); 561 | spare_ = nullptr; 562 | return block; 563 | } 564 | 565 | 566 | void HandleScopeImplementer::DeleteExtensions(internal::Object** prev_limit) { 567 | while (!blocks_.empty()) { 568 | internal::Object** block_start = blocks_.back(); 569 | internal::Object** block_limit = block_start + kHandleBlockSize; 570 | 571 | // SealHandleScope may make the prev_limit to point inside the block. 572 | if (block_start <= prev_limit && prev_limit <= block_limit) { 573 | #ifdef ENABLE_HANDLE_ZAPPING 574 | internal::HandleScope::ZapRange(prev_limit, block_limit); 575 | #endif 576 | break; 577 | } 578 | 579 | blocks_.pop_back(); 580 | #ifdef ENABLE_HANDLE_ZAPPING 581 | internal::HandleScope::ZapRange(block_start, block_limit); 582 | #endif 583 | if (spare_ != nullptr) { 584 | DeleteArray(spare_); 585 | } 586 | spare_ = block_start; 587 | } 588 | DCHECK((blocks_.empty() && prev_limit == nullptr) || 589 | (!blocks_.empty() && prev_limit != nullptr)); 590 | } 591 | 592 | // Interceptor functions called from generated inline caches to notify 593 | // CPU profiler that external callbacks are invoked. 594 | void InvokeAccessorGetterCallback( 595 | v8::Local property, 596 | const v8::PropertyCallbackInfo& info, 597 | v8::AccessorNameGetterCallback getter); 598 | 599 | void InvokeFunctionCallback(const v8::FunctionCallbackInfo& info, 600 | v8::FunctionCallback callback); 601 | 602 | class Testing { 603 | public: 604 | static v8::Testing::StressType stress_type() { return stress_type_; } 605 | static void set_stress_type(v8::Testing::StressType stress_type) { 606 | stress_type_ = stress_type; 607 | } 608 | 609 | private: 610 | static v8::Testing::StressType stress_type_; 611 | }; 612 | 613 | } // namespace internal 614 | } // namespace v8 615 | 616 | #endif // V8_API_H_ 617 | -------------------------------------------------------------------------------- /demo/css.css: -------------------------------------------------------------------------------- 1 | .someClass { 2 | font-family: serif; 3 | } 4 | 5 | #someID { 6 | background: yellow; 7 | } 8 | 9 | main { 10 | margin-top: 20px; 11 | } 12 | -------------------------------------------------------------------------------- /demo/elm.elm: -------------------------------------------------------------------------------- 1 | main : Program Never Model Msg 2 | main = 3 | program 4 | { init = init 5 | , view = view 6 | , update = update 7 | , subscriptions = subscriptions 8 | } -------------------------------------------------------------------------------- /demo/html.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 |
Tacos Tacos
13 | 14 |

Tacos tacos tacos

15 | 16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /demo/issue-91.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import calculate from '../logic/calculate' 3 | import './App.css' 4 | import ButtonPanel from './ButtonPanel' 5 | import Display from './Display' 6 | 7 | class App extends React.Component { 8 | constructor(props) { 9 | super(props) 10 | this.state = { 11 | total: null 12 | } 13 | } 14 | 15 | handleClick = buttonName => { 16 | this.setState(calculate(this.state, buttonName)) 17 | } 18 | 19 | render() { 20 | return ( 21 |
22 | Tacos 23 | 24 | 25 |
26 | ) 27 | } 28 | } 29 | export default App 30 | -------------------------------------------------------------------------------- /demo/issue-91.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import calculate from '../logic/calculate' 3 | import './App.css' 4 | import ButtonPanel from './ButtonPanel' 5 | import Display from './Display' 6 | 7 | class App extends React.Component { 8 | constructor(props) { 9 | super(props) 10 | this.state = { 11 | total: null 12 | } 13 | } 14 | 15 | handleClick = buttonName => { 16 | this.setState(calculate(this.state, buttonName)) 17 | } 18 | 19 | render() { 20 | return ( 21 |
22 | Tacos 23 | 24 | 25 |
26 | ) 27 | } 28 | } 29 | export default App 30 | -------------------------------------------------------------------------------- /demo/js.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | class Sale { 3 | constructor(price) { 4 | ;[this.decoratorsList, this.price] = [[], price] 5 | } 6 | 7 | decorate(decorator) { 8 | if (!Sale[decorator]) throw new Error(`decorator not exist: ${decorator}`) 9 | this.decoratorsList.push(Sale[decorator]) 10 | } 11 | 12 | getPrice() { 13 | for (let decorator of this.decoratorsList) { 14 | this.price = decorator(this.price) 15 | } 16 | return this.price.toFixed(2) 17 | } 18 | 19 | static quebec(price) { 20 | // this is a comment 21 | return price + price * 7.5 / 100 22 | } 23 | 24 | static fedtax(price) { 25 | return price + price * 5 / 100 26 | } 27 | } 28 | 29 | let sale = new Sale(100) 30 | sale.decorate('fedtax') 31 | sale.decorate('quebec') 32 | console.log(sale.getPrice()) //112.88 33 | 34 | getPrice() 35 | 36 | //deeply nested 37 | 38 | async function asyncCall() { 39 | var result = await resolveAfter2Seconds(); 40 | } 41 | 42 | const options = { 43 | connections: { 44 | compression: false 45 | } 46 | } 47 | 48 | for (let i = 0; i < 10; i++) { 49 | continue; 50 | } 51 | 52 | if (true) { } 53 | 54 | while (true) { } 55 | 56 | switch (2) { 57 | case 2: 58 | break; 59 | default: 60 | break; 61 | } 62 | 63 | class EditFishForm extends Component { 64 | static propTypes = { 65 | updateFish: PropTypes.func, 66 | deleteFish: PropTypes.func, 67 | index: PropTypes.string, 68 | fish: PropTypes.shape({ 69 | image: PropTypes.string, 70 | name: PropTypes.string.isRequired 71 | }) 72 | } 73 | } -------------------------------------------------------------------------------- /demo/json.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "mocha": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "rules": { 9 | "indent": ["error", 2], 10 | "linebreak-style": ["error", "unix"], 11 | "quotes": ["error", "single"], 12 | "semi": ["error", "always"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /demo/markdown.md: -------------------------------------------------------------------------------- 1 | # In Bed by 7pm Theme 2 | 3 | > In Bed by 7pm theme for VS Code. 4 | 5 | ![Preview](images/preview.gif) 6 | 7 | # Installation 8 | 9 | 1. Install [Visual Studio Code](https://code.visualstudio.com/) 10 | 2. Launch Visual Studio Code 11 | 3. Choose **Extensions** from menu 12 | 4. Search for `in bed by 7pm` 13 | 5. Click **Install** to install it 14 | 6. Click **Reload** to reload the Code 15 | 7. File > Preferences > Color Theme > **In Bed By 7pm** 16 | 17 | This is `code` 18 | 19 | -[ ] check check 12 12 20 | -[ ] check check 12 12 21 | 22 | Heading 1 23 | ======== 24 | 25 | Heading 2 26 | -------------- 27 | 28 | ### Heading 3 29 | -------------------------------------------------------------------------------- /demo/php.php: -------------------------------------------------------------------------------- 1 | pdo = new PDO($GLOBALS['db_dsn'], $GLOBALS['db_username'], $GLOBALS['db_password']); 11 | $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 12 | $this->pdo->query("CREATE TABLE hello (what VARCHAR(50) NOT NULL)"); 13 | } 14 | public function tearDown() 15 | { 16 | $this->pdo->query("DROP TABLE hello"); 17 | } 18 | public function testHelloWorld() 19 | { 20 | $helloWorld = new HelloWorld($this->pdo); 21 | $this->assertEquals('Hello World', $helloWorld->hello()); 22 | } 23 | public function testHello() 24 | { 25 | $helloWorld = new HelloWorld($this->pdo); 26 | $this->assertEquals('Hello Bar', $helloWorld->hello('Bar')); 27 | } 28 | public function testWhat() 29 | { 30 | $helloWorld = new HelloWorld($this->pdo); 31 | $this->assertFalse($helloWorld->what()); 32 | $helloWorld->hello('Bar'); 33 | $this->assertEquals('Bar', $helloWorld->what()); 34 | } 35 | } 36 | ?> -------------------------------------------------------------------------------- /demo/powershell.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Provisions a example powershell function 4 | .EXAMPLE 5 | PS C:\> .\powershell.ps1 -Argument1 "hola soy un texto" 6 | #> 7 | [CmdletBinding()] 8 | param( 9 | [Parameter(Mandatory = $true, HelpMessage = "This argument is required")] 10 | [String] 11 | $textParameter 12 | ) 13 | 14 | try { 15 | #almost every function is called like this: 16 | Write-Host "Initializing example function" 17 | Write-Host "The parameter is " $textParameter -ForegroundColor Red 18 | 19 | #this are variables 20 | $customArray = @( 21 | @{ 22 | Id = 1; 23 | Value = "I'm an option"; 24 | }, 25 | @{ 26 | Id = 2; 27 | Value = "Option No. 2"; 28 | } 29 | ) 30 | 31 | foreach ($option in $customArray) { 32 | Write-Host "Iterating options:" $option.Value 33 | } 34 | 35 | $collectionWithItems = New-Object System.Collections.ArrayList 36 | $temp = New-Object System.Object 37 | $temp | Add-Member -MemberType NoteProperty -Name "Title" -Value "Custom Object Title 1" 38 | $temp | Add-Member -MemberType NoteProperty -Name "Subject" -Value "Delegación del plan de acción [Folio_PlandeAccion]" 39 | $temp | Add-Member -MemberType NoteProperty -Name "Body" -Value "
This s a note example, with lots of text
40 |

 
41 |
It happens to be in html format, but is just text the property couldnt't know
42 |

 
43 |
It's up for the one who uses me to render me correctly. Or not.
" 44 | $collectionWithItems.Add($temp) | Out-Null 45 | Write-Host "My collection has" $collectionWithItems.Count "item(s)" -ForegroundColor Green 46 | 47 | #Calling some other scripts. Sometimes its nice to have a "master" script and call subscripts with other functions / actions 48 | .\otherscript.ps1 "Parameter ?" 49 | .\thisonewithoutparams.ps1 50 | 51 | #little bit of SharePoint *the original issue* :D 52 | $web = Get-SPWeb http://mysharepointsite 53 | $list = $web.Lists["ListName"] 54 | $query = New-Object Microsoft.SharePoint.SPQuery 55 | $query.Query= "CAMLQuery here" 56 | $query.ViewFields= "" 57 | $query.ViewFieldsOnly= $true 58 | $listitems = $list.GetItems($query); 59 | foreach($item in $listitems) { 60 | if($item -ne $null) { 61 | Write-Host "There is an elmeent in the list, id" $item.ID 62 | } 63 | } 64 | } 65 | catch { 66 | Write-Host -ForegroundColor Red "Exception Type: $($_.Exception.GetType().FullName)" 67 | Write-Host -ForegroundColor Red "Exception Message: $($_.Exception.Message)" 68 | } 69 | -------------------------------------------------------------------------------- /demo/pug.pug: -------------------------------------------------------------------------------- 1 | 2 | html(lang="en") 3 | 4 | head 5 | meta(charset="UTF-8") 6 | meta(name="viewport", content="width=device-width, initial-scale=1.0") 7 | meta(http-equiv="X-UA-Compatible", content="ie=edge") 8 | title Document 9 | 10 | body 11 | h1 Pug 12 | -------------------------------------------------------------------------------- /demo/python.py: -------------------------------------------------------------------------------- 1 | from collections import deque 2 | 3 | 4 | def topo(G, ind=None, Q=[1]): 5 | if ind == None: 6 | ind = [0] * (len(G) + 1) # this is a comment 7 | for u in G: 8 | for v in G[u]: 9 | ind[v] += 1 10 | Q = deque() 11 | for i in G: 12 | if ind[i] == 0: 13 | Q.append(i) 14 | if len(Q) == 0: 15 | return 16 | v = Q.popleft() 17 | print(v) 18 | for w in G[v]: 19 | ind[w] -= 1 20 | if ind[w] == 0: 21 | Q.append(w) 22 | topo(G, ind, Q) 23 | 24 | 25 | class SomeClass: 26 | def create_arr(self): # An instance method 27 | self.arr = [] 28 | 29 | def insert_to_arr(self, value): #An instance method 30 | self.arr.append(value) 31 | 32 | @classmethod 33 | def class_method(cls): 34 | print("the class method was called") 35 | -------------------------------------------------------------------------------- /demo/react.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import calculate from '../logic/calculate'; 3 | import './App.css'; 4 | import ButtonPanel from './ButtonPanel'; 5 | import Display from './Display'; 6 | 7 | class App extends React.Component { 8 | constructor(props) { 9 | super(props) 10 | this.state = { 11 | total: null, 12 | next: null, 13 | operation: null 14 | } 15 | } 16 | 17 | handleClick = buttonName => { 18 | this.setState(calculate(this.state, buttonName)) 19 | } 20 | 21 | render() { 22 | return ( 23 |
24 | Tacos 25 | 26 | 27 |
28 | ) 29 | } 30 | } 31 | export default App 32 | -------------------------------------------------------------------------------- /demo/ruby.rb: -------------------------------------------------------------------------------- 1 | module ExampleModule 2 | class ExampleClass::ScopeResolution < NewScope::Operator 3 | 4 | def initialize(options) 5 | @@class_var = options[:class] 6 | @instance_var = options[:instance] 7 | end 8 | 9 | def method 10 | puts 'doing stuff' 11 | yield if block_given? 12 | other_method(:arg) 13 | end 14 | 15 | def self.class_method 16 | return "I am a class method!" 17 | end 18 | 19 | private 20 | 21 | def other_method(*args) 22 | puts 'doing other stuff #{42}' 23 | end 24 | 25 | def self.private 26 | [1, 2, 3].each do |item| 27 | puts item 28 | end 29 | end 30 | 31 | private_class_method :private 32 | 33 | private 34 | 35 | def user_params 36 | params.require(:user).permit(:username, :email, :password) 37 | params.pluck(:user) 38 | end 39 | end 40 | end 41 | 42 | ExampleModule::ExampleClass::ScopeResolution 43 | example_instance = ExampleModule::ExampleClass::ScopeResolution.new(:arg) 44 | 45 | example_instance.method(:arg) do 46 | puts 'yielding in block!' 47 | end -------------------------------------------------------------------------------- /demo/statelessfunctionalreact.js: -------------------------------------------------------------------------------- 1 | // I use this syntax when my component fits on one line 2 | const ListItem = props =>
  • {props.item.name}
  • 3 | 4 | // I use this when my component has no logic outside JSX 5 | const List = ({ items }) => ( 6 |
      {items.map(item => )}
    7 | ) 8 | 9 | // I use this when the component needs logic outside JSX. 10 | const Body = props => { 11 | let items = transformItems(props.rawItems) 12 | return ( 13 |
    14 |

    {props.header}

    15 | 16 |
    17 | ) 18 | } 19 | 20 | const Foo = () =>
    21 |
    22 |
    23 | 24 | // This is equivalent to the last example 25 | function Page(props, context) { 26 | return ( 27 |
    28 | 29 |
    30 | ) 31 | } 32 | // propTypes and contextTypes are supported 33 | Page.propTypes = { 34 | rawItems: React.PropTypes.array.isRequired 35 | } 36 | -------------------------------------------------------------------------------- /demo/stylus.styl: -------------------------------------------------------------------------------- 1 | .someClass { 2 | font-family: serif; 3 | } 4 | 5 | #someID { 6 | background: yellow; 7 | } 8 | 9 | main { 10 | margin-top: 20px; 11 | } 12 | 13 | .someotherclass { 14 | padding: 20px; 15 | box-shadow: 0 0 0 2px inset; 16 | } 17 | -------------------------------------------------------------------------------- /demo/tsx.tsx: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy } from '@angular/core' 2 | import { Person, SearchService } from '../shared' 3 | import { ActivatedRoute } from '@angular/router' 4 | import { Subscription } from 'rxjs' 5 | 6 | @Component({ 7 | selector: 'app-search', 8 | templateUrl: './search.component.html', 9 | styleUrls: ['./search.component.css'] 10 | }) 11 | export class SearchComponent implements OnInit, OnDestroy { 12 | query: string 13 | searchResults: Array 14 | sub: Subscription 15 | 16 | constructor( 17 | private searchService: SearchService, 18 | private route: ActivatedRoute 19 | ) {} 20 | 21 | ngOnInit() { 22 | this.sub = this.route.params.subscribe(params => { 23 | if (params['term']) { 24 | this.query = decodeURIComponent(params['term']) 25 | this.search() 26 | } 27 | }) 28 | } 29 | 30 | search(): void { 31 | this.searchService.search(this.query).subscribe( 32 | (data: any) => { 33 | this.searchResults = data 34 | }, 35 | error => console.log(error) 36 | ) 37 | } 38 | 39 | ngOnDestroy() { 40 | if (this.sub) { 41 | this.sub.unsubscribe() 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /demo/vuedemo.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 29 | 30 | -------------------------------------------------------------------------------- /demo/yml.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | install: 5 | - npm install 6 | script: 7 | - npm test 8 | after_script: 9 | - npm run coveralls 10 | notifications: 11 | email: 12 | on_success: never 13 | on_failure: always 14 | -------------------------------------------------------------------------------- /inbedby7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdras/inbedby7pm/8c600870d623f2c0012c1c0f834573540bd1a572/inbedby7.png -------------------------------------------------------------------------------- /js-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdras/inbedby7pm/8c600870d623f2c0012c1c0f834573540bd1a572/js-sample.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inbedby7pm", 3 | "displayName": "In Bed By 7pm", 4 | "description": "A color theme for non-night owls", 5 | "version": "0.4.0", 6 | "publisher": "sdras", 7 | "license": "SEE LICENSE IN LICENSE.md", 8 | "engines": { 9 | "vscode": "^1.49.0" 10 | }, 11 | "categories": [ 12 | "Themes" 13 | ], 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/sdras/inbedby7pm" 17 | }, 18 | "icon": "sleep-icon.jpg", 19 | "galleryBanner": { 20 | "color": "#41678b", 21 | "theme": "dark" 22 | }, 23 | "scripts": { 24 | "publish": "vsce publish" 25 | }, 26 | "keywords": [ 27 | "Theme", 28 | "Dark Theme", 29 | "In Bed By 7pm", 30 | "InBedBy7pm", 31 | "Soothing", 32 | "Palette", 33 | "Sleepy" 34 | ], 35 | "contributes": { 36 | "themes": [ 37 | { 38 | "label": "In Bed by 7pm", 39 | "uiTheme": "vs-dark", 40 | "path": "./themes/in-bed-by-7.json" 41 | } 42 | ] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /powershell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdras/inbedby7pm/8c600870d623f2c0012c1c0f834573540bd1a572/powershell.png -------------------------------------------------------------------------------- /react-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdras/inbedby7pm/8c600870d623f2c0012c1c0f834573540bd1a572/react-sample.png -------------------------------------------------------------------------------- /sleep-icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdras/inbedby7pm/8c600870d623f2c0012c1c0f834573540bd1a572/sleep-icon.jpg -------------------------------------------------------------------------------- /themes/in-bed-by-7.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "In Bed by 7pm", 3 | "type": "dark", 4 | "colors": { 5 | "editor.background": "#292c3d", 6 | "editor.foreground": "#ebecf1", 7 | "contrastBorder": "#1a1c27", 8 | "focusBorder": "#1a1c27", 9 | "foreground": "#ebecf1", 10 | "widget.shadow": "#292c3d", 11 | "selection.background": "#ffffff22", 12 | "errorForeground": "#c18e76", 13 | "button.background": "#7e57c2cc", 14 | "button.foreground": "#ffffffcc", 15 | "button.hoverBackground": "#7e57c2", 16 | "dropdown.background": "#292c3d", 17 | "dropdown.border": "#ebf7ff", 18 | "dropdown.foreground": "#ffffffcc", 19 | "input.background": "#1f2129cc", 20 | "input.border": "#666a79", 21 | "input.foreground": "#ffffffcc", 22 | "input.placeholderForeground": "#ebf7ff", 23 | "inputOption.activeBorder": "#777a79", 24 | "inputValidation.errorBackground": "#AB0300F2", 25 | "inputValidation.errorBorder": "#EF5350", 26 | "inputValidation.infoBackground": "#00589EF2", 27 | "inputValidation.infoBorder": "#64B5F6", 28 | "inputValidation.warningBackground": "#675700F2", 29 | "inputValidation.warningBorder": "#FFCA28", 30 | "scrollbar.shadow": "#010b14", 31 | "scrollbarSlider.activeBackground": "#191f383f", 32 | "scrollbarSlider.background": "#191f383f", 33 | "scrollbarSlider.hoverBackground": "#191f383f", 34 | "badge.background": "#a27c1178", 35 | "badge.foreground": "#ffffff", 36 | "breadcrumb.foreground": "#89a4bb", 37 | "breadcrumb.focusForeground": "#ffffff", 38 | "breadcrumb.activeSelectionForeground": "#FFFFFF", 39 | "breadcrumbPicker.background": "#001122", 40 | "list.activeSelectionBackground": "#212533c9", 41 | "list.activeSelectionForeground": "#ffffff", 42 | "list.invalidItemForeground": "#975f94", 43 | "list.dropBackground": "#292c3d", 44 | "list.focusBackground": "#010d18", 45 | "list.focusForeground": "#ffffff", 46 | "list.highlightForeground": "#ffffff", 47 | "list.highlightBackground": "#00000033", 48 | "list.hoverBackground": "#292c3d", 49 | "list.hoverForeground": "#ffffff", 50 | "list.inactiveSelectionBackground": "#30354A", 51 | "list.inactiveSelectionForeground": "#ebf7ff", 52 | "activityBar.background": "#292c3d", 53 | "activityBar.foreground": "#ebf7ff", 54 | "activityBar.border": "#292c3d", 55 | "activityBarBadge.background": "#a27c1178", 56 | "activityBarBadge.foreground": "#ffffff", 57 | "sideBar.background": "#292c3d", 58 | "sideBar.foreground": "#89a4bb", 59 | "sideBar.border": "#292c3d", 60 | "sideBarTitle.foreground": "#ebf7ff", 61 | "sideBarSectionHeader.background": "#292c3d", 62 | "sideBarSectionHeader.foreground": "#ebf7ff", 63 | "editorGroup.emptyBackground": "#292c3d", 64 | "editorGroup.border": "#292c3d", 65 | "editorGroup.dropBackground": "#7e57c273", 66 | "editorGroupHeader.noTabsBackground": "#292c3d", 67 | "editorGroupHeader.tabsBackground": "#292c3d", 68 | "editorGroupHeader.tabsBorder": "#262A39", 69 | "tab.activeBackground": "#1f2129", 70 | "tab.activeForeground": "#d2dee7", 71 | "tab.border": "#17181d", 72 | "tab.activeBorder": null, 73 | "tab.unfocusedActiveBorder": "#17181d", 74 | "tab.inactiveBackground": "#292c3d", 75 | "tab.inactiveForeground": "#ebf7ff", 76 | "tab.unfocusedActiveForeground": "#ebf7ff", 77 | "tab.unfocusedInactiveForeground": "#17181d", 78 | "editorLineNumber.foreground": "#4b6479", 79 | "editorLineNumber.activeForeground": "#C5E4FD", 80 | "editorCursor.foreground": "#80a4c2", 81 | "editor.selectionBackground": "#4c536cba", 82 | "editor.selectionHighlightBackground": "#4c536cba", 83 | "editor.inactiveSelectionBackground": "#303649a4", 84 | "editor.wordHighlightBackground": "#16192333", 85 | "editor.wordHighlightStrongBackground": "#16192333", 86 | "editor.findMatchBackground": "#f3ff486b", 87 | "editor.findMatchHighlightBackground": "#f3ff482a", 88 | "editor.findRangeHighlightBackground": null, 89 | "editor.hoverHighlightBackground": "#16192322", 90 | "editor.lineHighlightBackground": "#16192366", 91 | "editor.lineHighlightBorder": null, 92 | "editorLink.activeForeground": null, 93 | "editor.rangeHighlightBackground": "#161923dd", 94 | "editorWhitespace.foreground": null, 95 | "editorIndentGuide.background": "#5e81ce52", 96 | "editorIndentGuide.activeBackground": "#7E97AC", 97 | "editorRuler.foreground": "#5e81ce52", 98 | "editorCodeLens.foreground": "#5e82ceb4", 99 | "editorBracketMatch.background": "#ebf7ff4d", 100 | "editorBracketMatch.border": null, 101 | "editorOverviewRuler.currentContentForeground": "#7e57c2", 102 | "editorOverviewRuler.incomingContentForeground": "#7e57c2", 103 | "editorOverviewRuler.commonContentForeground": "#7e57c2", 104 | "editorError.foreground": "#EF5350", 105 | "editorError.border": null, 106 | "editorWarning.foreground": "#b39554", 107 | "editorWarning.border": null, 108 | "editorGutter.background": "#292c3d", 109 | "editorGutter.modifiedBackground": "#a5ffe2db", 110 | "editorGutter.addedBackground": "#9CCC65", 111 | "editorGutter.deletedBackground": "#EF5350", 112 | "diffEditor.insertedTextBackground": "#99b76d23", 113 | "diffEditor.insertedTextBorder": "#86cca933", 114 | "diffEditor.removedTextBackground": "#ef535033", 115 | "diffEditor.removedTextBorder": "#ef53504d", 116 | "editorWidget.background": "#1f2129", 117 | "editorWidget.border": "#666a79", 118 | "editorSuggestWidget.background": "#292c3d", 119 | "editorSuggestWidget.border": "#666a79", 120 | "editorSuggestWidget.foreground": "#ebecf1", 121 | "editorSuggestWidget.highlightForeground": "#ffffff", 122 | "editorSuggestWidget.selectedBackground": "#00000033", 123 | "editorHoverWidget.background": "#292c3d", 124 | "editorHoverWidget.border": "#666a79", 125 | "debugExceptionWidget.background": "#1f2129", 126 | "debugExceptionWidget.border": "#666a79", 127 | "editorMarkerNavigation.background": "#30354a", 128 | "editorMarkerNavigationError.background": "#1f2129", 129 | "editorMarkerNavigationWarning.background": "#FFCA28", 130 | "peekView.border": "#666a79", 131 | "peekViewEditor.background": "#1f2129", 132 | "peekViewEditor.matchHighlightBackground": "#7e57c25a", 133 | "peekViewResult.background": "#1f2129", 134 | "peekViewResult.fileForeground": "#ebf7ff", 135 | "peekViewResult.lineForeground": "#ebf7ff", 136 | "peekViewResult.matchHighlightBackground": "#ffffff55", 137 | "peekViewResult.selectionBackground": "#2E3250", 138 | "peekViewResult.selectionForeground": "#ebf7ff", 139 | "peekViewTitle.background": "#292c3d", 140 | "peekViewTitleDescription.foreground": "#697098", 141 | "peekViewTitleLabel.foreground": "#ebf7ff", 142 | "merge.currentHeaderBackground": "#ebf7ff", 143 | "merge.currentContentBackground": null, 144 | "merge.incomingHeaderBackground": "#7e57c25a", 145 | "merge.incomingContentBackground": null, 146 | "merge.border": null, 147 | "panel.background": "#292c3d", 148 | "panel.border": "#666a79", 149 | "panelTitle.activeBorder": "#666a79", 150 | "panelTitle.activeForeground": "#ffffffcc", 151 | "panelTitle.inactiveForeground": "#ebecf180", 152 | "statusBar.background": "#292c3d", 153 | "statusBar.foreground": "#ebf7ff", 154 | "statusBar.border": "#666a79", 155 | "statusBar.debuggingBackground": "#202431", 156 | "statusBar.debuggingForeground": null, 157 | "statusBar.debuggingBorder": "#666a79", 158 | "statusBar.noFolderForeground": null, 159 | "statusBar.noFolderBackground": "#292c3d", 160 | "statusBar.noFolderBorder": "#666a79", 161 | "statusBarItem.activeBackground": "#202431", 162 | "statusBarItem.hoverBackground": "#202431", 163 | "statusBarItem.prominentBackground": "#202431", 164 | "statusBarItem.prominentHoverBackground": "#202431", 165 | "titleBar.activeBackground": "#292c3d", 166 | "titleBar.activeForeground": "#eeefff", 167 | "titleBar.inactiveBackground": "#292c3d", 168 | "titleBar.inactiveForeground": null, 169 | "notifications.background": "#30354A", 170 | "notifications.border": "#666a79", 171 | "notificationCenter.border": "#666a79", 172 | "notificationToast.border": "#666a79", 173 | "notifications.foreground": "#ffffffcc", 174 | "notificationLink.foreground": "#80CBC4", 175 | "extensionButton.prominentForeground": "#ffffffcc", 176 | "extensionButton.prominentBackground": "#7e57c2cc", 177 | "extensionButton.prominentHoverBackground": "#7e57c2", 178 | "pickerGroup.foreground": "#d1aaff", 179 | "pickerGroup.border": "#292c3d", 180 | "terminal.ansiWhite": "#ffffff", 181 | "terminal.ansiBlack": "#292c3d", 182 | "terminal.ansiBlue": "#9dd2e8", 183 | "terminal.ansiCyan": "#21c7a8", 184 | "terminal.ansiGreen": "#a5ffbd", 185 | "terminal.ansiMagenta": "#be8fda", 186 | "terminal.ansiRed": "#f88070", 187 | "terminal.ansiYellow": "#f7e9b4", 188 | "terminal.ansiBrightWhite": "#ffffff", 189 | "terminal.ansiBrightBlack": "#575656", 190 | "terminal.ansiBrightBlue": "#9dd2e8", 191 | "terminal.ansiBrightCyan": "#7fdbca", 192 | "terminal.ansiBrightGreen": "#a5ffbd", 193 | "terminal.ansiBrightMagenta": "#be8fda", 194 | "terminal.ansiBrightRed": "#f88070", 195 | "terminal.ansiBrightYellow": "#ffeb95", 196 | "terminal.selectionBackground": "#1b90dd4d", 197 | "terminalCursor.background": "#234d70", 198 | "debugToolBar.background": "#292c3d", 199 | "welcomePage.buttonBackground": "#434c5e", 200 | "welcomePage.buttonHoverBackground": "#4c566a", 201 | "walkThrough.embeddedEditorBackground": "#292c3d", 202 | "gitDecoration.modifiedResourceForeground": "#a2bffc", 203 | "gitDecoration.deletedResourceForeground": "#EF535090", 204 | "gitDecoration.untrackedResourceForeground": "#86cca9ff", 205 | "gitDecoration.ignoredResourceForeground": "#395a75", 206 | "gitDecoration.conflictingResourceForeground": "#ffeb95cc" 207 | }, 208 | "tokenColors": [ 209 | { 210 | "name": "Comment", 211 | "scope": ["comment", "punctuation.definition.comment"], 212 | "settings": { 213 | "fontStyle": "italic", 214 | "foreground": "#b6b5cca1" 215 | } 216 | }, 217 | { 218 | "name": "Variables", 219 | "scope": ["variable", "string constant.other.placeholder"], 220 | "settings": { 221 | "foreground": "#d4f5f5", 222 | "fontStyle": "italic" 223 | } 224 | }, 225 | { 226 | "name": "Colors", 227 | "scope": ["constant.other.color"], 228 | "settings": { 229 | "foreground": "#ffffff" 230 | } 231 | }, 232 | { 233 | "name": "Invalid", 234 | "scope": ["invalid", "invalid.illegal"], 235 | "settings": { 236 | "foreground": "#e9f3b7" 237 | } 238 | }, 239 | { 240 | "name": "Keyword, Storage", 241 | "scope": ["keyword", "storage.type", "storage.modifier"], 242 | "settings": { 243 | "foreground": "#be8fda" 244 | } 245 | }, 246 | { 247 | "name": "Operator, Misc", 248 | "scope": [ 249 | "keyword.control", 250 | "constant.other.color", 251 | "punctuation", 252 | "meta.tag", 253 | "punctuation.definition.tag", 254 | "punctuation.separator.inheritance.php", 255 | "punctuation.definition.tag.html", 256 | "punctuation.definition.tag.begin.html", 257 | "punctuation.definition.tag.end.html", 258 | "punctuation.section.embedded", 259 | "keyword.other.template", 260 | "keyword.other.substitution" 261 | ], 262 | "settings": { 263 | "foreground": "#9dd2e8" 264 | } 265 | }, 266 | { 267 | "name": "Tag", 268 | "scope": [ 269 | "entity.name.tag", 270 | "meta.tag.sgml", 271 | "markup.deleted.git_gutter" 272 | ], 273 | "settings": { 274 | "foreground": "#eeadf1" 275 | } 276 | }, 277 | { 278 | "name": "Variable Property Other object property", 279 | "scope": ["variable.other.object.property"], 280 | "settings": { 281 | "foreground": "#faf39f", 282 | "fontStyle": "italic" 283 | } 284 | }, 285 | { 286 | "name": "Function, Special Method", 287 | "scope": [ 288 | "entity.name.function", 289 | "meta.function-call", 290 | "variable.function", 291 | "support.function", 292 | "keyword.other.special-method" 293 | ], 294 | "settings": { 295 | "foreground": "#e2c3b2" 296 | } 297 | }, 298 | { 299 | "name": "Block Level Variables", 300 | "scope": ["meta.block variable.other"], 301 | "settings": { 302 | "foreground": "#f7c1a7" 303 | } 304 | }, 305 | { 306 | "name": "Other Variable, String Link", 307 | "scope": ["support.other.variable", "string.other.link"], 308 | "settings": { 309 | "foreground": "#f7c1a7" 310 | } 311 | }, 312 | { 313 | "name": "Number, Constant, Function Argument, Tag Attribute, Embedded", 314 | "scope": [ 315 | "constant.numeric", 316 | "constant.language", 317 | "support.constant", 318 | "constant.character", 319 | "constant.escape", 320 | "variable.parameter", 321 | "keyword.other.unit", 322 | "keyword.other" 323 | ], 324 | "settings": { 325 | "foreground": "#e9f3b7", 326 | "fontStyle": "italic" 327 | } 328 | }, 329 | { 330 | "name": "String, Symbols, Markup Heading", 331 | "scope": ["string", "markup.heading", "markup.inserted.git_gutter"], 332 | "settings": { 333 | "foreground": "#8ec3f9" 334 | } 335 | }, 336 | { 337 | "name": "String Quoted", 338 | "scope": [ 339 | "string.quoted", 340 | "variable.other.readwrite.js", 341 | "string.quoted.single.js" 342 | ], 343 | "settings": { 344 | "foreground": "#e2c3b2" 345 | } 346 | }, 347 | { 348 | "name": "Object Keys", 349 | "scope": [ 350 | "string.unquoted.js", 351 | "constant.other.object.key.js", 352 | "constant.other.symbol", 353 | "constant.other.key", 354 | "source.js" 355 | ], 356 | "settings": { 357 | "foreground": "#9dd2e8" 358 | } 359 | }, 360 | { 361 | "name": "Inherited Class", 362 | "scope": [ 363 | "entity.other.inherited-class", 364 | "meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js" 365 | ], 366 | "settings": { 367 | "foreground": "#a5ffe2" 368 | } 369 | }, 370 | { 371 | "name": "Class, Support", 372 | "scope": [ 373 | "entity.name", 374 | "support.type", 375 | "support.class", 376 | "support.orther.namespace.use.php", 377 | "meta.use.php", 378 | "support.other.namespace.php", 379 | "markup.changed.git_gutter", 380 | "support.type.sys-types" 381 | ], 382 | "settings": { 383 | "foreground": "#a5ffe2" 384 | } 385 | }, 386 | { 387 | "name": "Entity Types", 388 | "scope": ["support.type"], 389 | "settings": { 390 | "foreground": "#B2CCD6" 391 | } 392 | }, 393 | { 394 | "name": "CSS Class and Support", 395 | "scope": [ 396 | "source.css support.type.property-name", 397 | "source.sass support.type.property-name", 398 | "source.scss support.type.property-name", 399 | "source.less support.type.property-name", 400 | "source.stylus support.type.property-name", 401 | "source.postcss support.type.property-name" 402 | ], 403 | "settings": { 404 | "foreground": "#b2f9e9" 405 | } 406 | }, 407 | { 408 | "name": "Sub-methods", 409 | "scope": [ 410 | "entity.name.module.js", 411 | "variable.import.parameter.js", 412 | "variable.other.class.js" 413 | ], 414 | "settings": { 415 | "foreground": "#e9f3b7" 416 | } 417 | }, 418 | { 419 | "name": "Language methods", 420 | "scope": ["variable.language"], 421 | "settings": { 422 | "fontStyle": "italic", 423 | "foreground": "#e9f3b7" 424 | } 425 | }, 426 | { 427 | "name": "entity.name.method.js", 428 | "scope": ["entity.name.method.js"], 429 | "settings": { 430 | "fontStyle": "italic", 431 | "foreground": "#9dd2e8" 432 | } 433 | }, 434 | { 435 | "name": "meta.method.js", 436 | "scope": [ 437 | "meta.class-method.js entity.name.function.js", 438 | "variable.function.constructor" 439 | ], 440 | "settings": { 441 | "foreground": "#e2c3b2" 442 | } 443 | }, 444 | { 445 | "name": "Attributes", 446 | "scope": ["entity.other.attribute-name"], 447 | "settings": { 448 | "foreground": "#cde0be" 449 | } 450 | }, 451 | { 452 | "name": "HTML Attributes", 453 | "scope": [ 454 | "text.html.basic entity.other.attribute-name.html", 455 | "text.html.basic entity.other.attribute-name" 456 | ], 457 | "settings": { 458 | "fontStyle": "italic", 459 | "foreground": "#bde5f5" 460 | } 461 | }, 462 | { 463 | "name": "CSS Classes", 464 | "scope": ["entity.other.attribute-name.class"], 465 | "settings": { 466 | "foreground": "#e2c3b2" 467 | } 468 | }, 469 | { 470 | "name": "CSS ID's", 471 | "scope": ["source.sass keyword.control"], 472 | "settings": { 473 | "foreground": "#e2c3b2" 474 | } 475 | }, 476 | { 477 | "name": "Inserted", 478 | "scope": ["markup.inserted"], 479 | "settings": { 480 | "foreground": "#C3E88D" 481 | } 482 | }, 483 | { 484 | "name": "Deleted", 485 | "scope": ["markup.deleted"], 486 | "settings": { 487 | "foreground": "#e9f3b7" 488 | } 489 | }, 490 | { 491 | "name": "Changed", 492 | "scope": ["markup.changed"], 493 | "settings": { 494 | "foreground": "#be8fda" 495 | } 496 | }, 497 | { 498 | "name": "Regular Expressions", 499 | "scope": ["string.regexp"], 500 | "settings": { 501 | "fontStyle": "italic", 502 | "foreground": "#9dd2e8" 503 | } 504 | }, 505 | { 506 | "name": "Escape Characters", 507 | "scope": ["constant.character.escape"], 508 | "settings": { 509 | "foreground": "#9dd2e8" 510 | } 511 | }, 512 | { 513 | "name": "URL", 514 | "scope": ["*url*", "*link*", "*uri*"], 515 | "settings": { 516 | "fontStyle": "underline" 517 | } 518 | }, 519 | { 520 | "name": "Decorators", 521 | "scope": [ 522 | "tag.decorator.js entity.name.tag.js", 523 | "tag.decorator.js punctuation.definition.tag.js" 524 | ], 525 | "settings": { 526 | "fontStyle": "italic", 527 | "foreground": "#9dd2e8" 528 | } 529 | }, 530 | { 531 | "name": "ES7 Bind Operator", 532 | "scope": [ 533 | "source.js constant.other.object.key.js string.unquoted.label.js" 534 | ], 535 | "settings": { 536 | "fontStyle": "italic", 537 | "foreground": "#e9f3b7" 538 | } 539 | }, 540 | { 541 | "name": "JSON Key - Level 0", 542 | "scope": [ 543 | "source.json meta.structure.dictionary.json support.type.property-name.json" 544 | ], 545 | "settings": { 546 | "foreground": "#9dd2e8" 547 | } 548 | }, 549 | { 550 | "name": "JSON Key - Level 1", 551 | "scope": [ 552 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 553 | ], 554 | "settings": { 555 | "foreground": "#eeadf1" 556 | } 557 | }, 558 | { 559 | "name": "JSON Key - Level 2", 560 | "scope": [ 561 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 562 | ], 563 | "settings": { 564 | "foreground": "#eccdcd" 565 | } 566 | }, 567 | { 568 | "name": "JSON Key - Level 3", 569 | "scope": [ 570 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 571 | ], 572 | "settings": { 573 | "foreground": "#cde0be" 574 | } 575 | }, 576 | { 577 | "name": "JSON Key - Level 4", 578 | "scope": [ 579 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 580 | ], 581 | "settings": { 582 | "foreground": "#eeadf1" 583 | } 584 | }, 585 | { 586 | "name": "JSON Key - Level 5", 587 | "scope": [ 588 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 589 | ], 590 | "settings": { 591 | "foreground": "#a5ffe2" 592 | } 593 | }, 594 | { 595 | "name": "JSON Key - Level 6", 596 | "scope": [ 597 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 598 | ], 599 | "settings": { 600 | "foreground": "#f7c1a7" 601 | } 602 | }, 603 | { 604 | "name": "JSON Key - Level 7", 605 | "scope": [ 606 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 607 | ], 608 | "settings": { 609 | "foreground": "#be8fda" 610 | } 611 | }, 612 | { 613 | "name": "JSON Key - Level 8", 614 | "scope": [ 615 | "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" 616 | ], 617 | "settings": { 618 | "foreground": "#C3E88D" 619 | } 620 | }, 621 | { 622 | "name": "Markdown - Plain", 623 | "scope": [ 624 | "text.html.markdown", 625 | "punctuation.definition.list_item.markdown" 626 | ], 627 | "settings": { 628 | "foreground": "#EEFFFF" 629 | } 630 | }, 631 | { 632 | "name": "Markdown - Markup Raw Inline", 633 | "scope": ["text.html.markdown markup.inline.raw.markdown"], 634 | "settings": { 635 | "foreground": "#be8fda" 636 | } 637 | }, 638 | { 639 | "name": "Markdown - Markup Raw Inline Punctuation", 640 | "scope": [ 641 | "text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown" 642 | ], 643 | "settings": { 644 | "foreground": "#65737E" 645 | } 646 | }, 647 | { 648 | "name": "Markdown - Heading", 649 | "scope": [ 650 | "markdown.heading", 651 | "markup.heading | markup.heading entity.name", 652 | "markup.heading.markdown punctuation.definition.heading.markdown" 653 | ], 654 | "settings": { 655 | "foreground": "#a5ffe2" 656 | } 657 | }, 658 | { 659 | "name": "Markup - Italic", 660 | "scope": ["markup.italic"], 661 | "settings": { 662 | "fontStyle": "italic", 663 | "foreground": "#f7c1a7" 664 | } 665 | }, 666 | { 667 | "name": "Markup - Bold", 668 | "scope": ["markup.bold", "markup.bold string"], 669 | "settings": { 670 | "fontStyle": "bold", 671 | "foreground": "#f7c1a7" 672 | } 673 | }, 674 | { 675 | "name": "Markup - Bold-Italic", 676 | "scope": [ 677 | "markup.bold markup.italic", 678 | "markup.italic markup.bold", 679 | "markup.quote markup.bold", 680 | "markup.bold markup.italic string", 681 | "markup.italic markup.bold string", 682 | "markup.quote markup.bold string" 683 | ], 684 | "settings": { 685 | "fontStyle": "bold", 686 | "foreground": "#f7c1a7" 687 | } 688 | }, 689 | { 690 | "name": "Markup - Underline", 691 | "scope": ["markup.underline"], 692 | "settings": { 693 | "fontStyle": "underline", 694 | "foreground": "#e9f3b7" 695 | } 696 | }, 697 | { 698 | "name": "Markdown - Blockquote", 699 | "scope": ["markup.quote punctuation.definition.blockquote.markdown"], 700 | "settings": { 701 | "foreground": "#65737E" 702 | } 703 | }, 704 | { 705 | "name": "Markup - Quote", 706 | "scope": ["markup.quote"], 707 | "settings": { 708 | "fontStyle": "italic" 709 | } 710 | }, 711 | { 712 | "name": "Markdown - Link", 713 | "scope": ["string.other.link.title.markdown"], 714 | "settings": { 715 | "foreground": "#e2c3b2" 716 | } 717 | }, 718 | { 719 | "name": "Markdown - Link Description", 720 | "scope": ["string.other.link.description.title.markdown"], 721 | "settings": { 722 | "foreground": "#be8fda" 723 | } 724 | }, 725 | { 726 | "name": "Markdown - Link Anchor", 727 | "scope": ["constant.other.reference.link.markdown"], 728 | "settings": { 729 | "foreground": "#bde5f5" 730 | } 731 | }, 732 | { 733 | "name": "Markup - Raw Block", 734 | "scope": ["markup.raw.block"], 735 | "settings": { 736 | "foreground": "#be8fda" 737 | } 738 | }, 739 | { 740 | "name": "Markdown - Raw Block Fenced", 741 | "scope": ["markup.raw.block.fenced.markdown"], 742 | "settings": { 743 | "foreground": "#00000050" 744 | } 745 | }, 746 | { 747 | "name": "Markdown - Fenced Bode Block", 748 | "scope": ["punctuation.definition.fenced.markdown"], 749 | "settings": { 750 | "foreground": "#00000050" 751 | } 752 | }, 753 | { 754 | "name": "Markdown - Fenced Bode Block Variable", 755 | "scope": [ 756 | "markup.raw.block.fenced.markdown", 757 | "variable.language.fenced.markdown", 758 | "punctuation.section.class.end" 759 | ], 760 | "settings": { 761 | "foreground": "#EEFFFF" 762 | } 763 | }, 764 | { 765 | "name": "Markdown - Fenced Language", 766 | "scope": ["variable.language.fenced.markdown"], 767 | "settings": { 768 | "foreground": "#65737E" 769 | } 770 | }, 771 | { 772 | "name": "Markdown Inline Raw String", 773 | "scope": "markup.inline.raw.string.markdown", 774 | "settings": { 775 | "foreground": "#eeadf1" 776 | } 777 | }, 778 | { 779 | "name": "Markdown - Separator", 780 | "scope": ["meta.separator"], 781 | "settings": { 782 | "fontStyle": "bold", 783 | "foreground": "#65737E" 784 | } 785 | }, 786 | { 787 | "name": "Markup - Table", 788 | "scope": ["markup.table"], 789 | "settings": { 790 | "foreground": "#EEFFFF" 791 | } 792 | }, 793 | { 794 | "name": "TypeScript[React] Variables and Object Properties", 795 | "scope": [ 796 | "variable.other.readwrite.alias.ts", 797 | "variable.other.readwrite.alias.tsx", 798 | "variable.other.readwrite.ts", 799 | "variable.other.readwrite.tsx", 800 | "variable.other.object.ts", 801 | "variable.other.object.tsx", 802 | "variable.object.property.ts", 803 | "variable.object.property.tsx", 804 | "variable.other.ts", 805 | "variable.other.tsx", 806 | "variable.tsx", 807 | "variable.ts" 808 | ], 809 | "settings": { 810 | "foreground": "#a5ffe2" 811 | } 812 | }, 813 | { 814 | "name": "YAML Entity Name Tags", 815 | "scope": "entity.name.tag.yaml", 816 | "settings": { 817 | "foreground": "#a5ffe2" 818 | } 819 | }, 820 | { 821 | "name": "Go Constants e.g. nil, string format (%s, %d, etc.)", 822 | "scope": [ 823 | "source.go constant.language.go", 824 | "source.go constant.other.placeholder.go" 825 | ], 826 | "settings": { 827 | "foreground": "#cde0be" 828 | } 829 | }, 830 | { 831 | "name": "C++ Functions", 832 | "scope": [ 833 | "entity.name.function.preprocessor.cpp", 834 | "entity.scope.name.cpp" 835 | ], 836 | "settings": { 837 | "foreground": "#cde0be" 838 | } 839 | }, 840 | { 841 | "name": "C++ Meta Namespace", 842 | "scope": ["meta.namespace-block.cpp"], 843 | "settings": { 844 | "foreground": "#65737E" 845 | } 846 | }, 847 | { 848 | "name": "C++ Language Primitive Storage", 849 | "scope": ["storage.type.language.primitive.cpp"], 850 | "settings": { 851 | "foreground": "#ff5874" 852 | } 853 | }, 854 | { 855 | "name": "C++ Preprocessor Macro", 856 | "scope": ["meta.preprocessor.macro.cpp"], 857 | "settings": { 858 | "foreground": "#EEFFFF" 859 | } 860 | }, 861 | { 862 | "name": "C++ Variable Parameter", 863 | "scope": ["variable.parameter"], 864 | "settings": { 865 | "foreground": "#cde0be" 866 | } 867 | }, 868 | { 869 | "name": "Dart String", 870 | "scope": [ 871 | "string.interpolated.single.dart", 872 | "string.interpolated.double.dart" 873 | ], 874 | "settings": { 875 | "foreground": "#ff5874" 876 | } 877 | }, 878 | { 879 | "name": "Dart Class", 880 | "scope": "support.class.dart", 881 | "settings": { 882 | "foreground": "#EEFFFF" 883 | } 884 | }, 885 | { 886 | "name": "Ruby Variables", 887 | "scope": ["variable.other.ruby"], 888 | "settings": { 889 | "foreground": "#be8fda", 890 | "fontStyle": "italic" 891 | } 892 | } 893 | ] 894 | } 895 | -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | 5 | * This folder contains all of the files necessary for your color theme extension. 6 | * `package.json` - this is the manifest file that defines the location of the theme file and specifies the base theme of the theme. 7 | * `themes/In Bed by 7pm-color-theme.json` - the color theme definition file. 8 | 9 | ## Get up and running straight away 10 | 11 | * Press `F5` to open a new window with your extension loaded. 12 | * Open `File > Preferences > Color Themes` and pick your color theme. 13 | * Open a file that has a language associated. The languages' configured grammar will tokenize the text and assign 'scopes' to the tokens. To examine these scopes, invoke the `Inspect TM Scopes` command from the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) . 14 | 15 | ## Make changes 16 | 17 | * Changes to the theme file are automatically applied to the Extension Development Host window. 18 | 19 | ## Adopt your theme to Visual Studio Code 20 | 21 | * The token colorization is done based on standard TextMate themes. Colors are matched against one or more scopes. 22 | 23 | To learn more about scopes and how they're used, check out the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation. 24 | 25 | ## Install your extension 26 | 27 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 28 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 29 | -------------------------------------------------------------------------------- /vue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdras/inbedby7pm/8c600870d623f2c0012c1c0f834573540bd1a572/vue.png --------------------------------------------------------------------------------