Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10020ed878 | |||
| cece69fdd2 | |||
|
|
55fcc4ade9 | ||
|
|
f02ba0c258 | ||
|
|
c827d88763 | ||
|
|
57a1123b41 | ||
|
|
65aabf2630 |
28
.editorconfig
Normal file
28
.editorconfig
Normal file
@ -0,0 +1,28 @@
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
# Matches multiple files with brace expansion notation
|
||||
# Set default charset
|
||||
[*.{js,py}]
|
||||
charset = utf-8
|
||||
|
||||
# 2 space indentation
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Tab indentation (no size specified)
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
# Matches the exact files either package.json or .travis.yml
|
||||
[{package.json,.travis.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
197
.gitignore
vendored
197
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
### Custom ###
|
||||
*.vsix
|
||||
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
@ -67,60 +70,10 @@ $RECYCLE.BIN/
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
### Emacs ###
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
|
||||
### Vim ###
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
!*.svg # comment out if you don't need vector files
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
@ -133,26 +86,148 @@ Sessionx.vim
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
|
||||
# Coc configuration directory
|
||||
.vim
|
||||
|
||||
### VisualStudioCode ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
# !.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/launch.json
|
||||
*.code-workspace
|
||||
|
||||
### VisualStudioCode Patch ###
|
||||
# Ignore all local history of files
|
||||
.history
|
||||
.ionide
|
||||
|
||||
### dotenv ###
|
||||
.env
|
||||
|
||||
### Node ###
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
.env*.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Storybook build outputs
|
||||
.out
|
||||
.storybook-out
|
||||
storybook-static
|
||||
|
||||
# rollup.js default build output
|
||||
dist/
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# Temporary folders
|
||||
tmp/
|
||||
temp/
|
||||
|
||||
### Custom ###
|
||||
*.vsix
|
||||
|
||||
59
.markdownlint.jsonc
Normal file
59
.markdownlint.jsonc
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
// vim: ft=jsonc foldlevel=0 sw=2 ts=2 sts=2 et
|
||||
// Conf(current file) is not recognized when commented outside root {}
|
||||
// npm rc standards only recognizes json, ini
|
||||
// Ref
|
||||
// - https://www.npmjs.com/package/rc#standards
|
||||
// - https://github.com/igorshubovych/markdownlint-cli
|
||||
// - https://github.com/DavidAnson/markdownlint
|
||||
// - https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc
|
||||
// - https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
|
||||
// Plugins for other editors
|
||||
// - https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
|
||||
|
||||
// Default state for all rules
|
||||
"default": true,
|
||||
// Path to configuration file to extend
|
||||
"extends": null,
|
||||
// MD007/ul-indent - Unordered list indentation
|
||||
"MD007": {
|
||||
// Why indent size defaults to 2?
|
||||
// https://github.com/DavidAnson/markdownlint/issues/141
|
||||
// 2 spaces indent has compatibility issues:
|
||||
// - multi-markdown parsers require 4-space indents
|
||||
// - vim sleuth, polyglot have no support for 2 space auto indent with o
|
||||
"indent": 2
|
||||
},
|
||||
// MD010/no-hard-tabs - Hard tabs
|
||||
"MD010": {
|
||||
"code_blocks": false
|
||||
},
|
||||
// MD013/line-length - Line length
|
||||
// VSCode plugin disable this check by default
|
||||
"MD013": false,
|
||||
// "MD013": {
|
||||
// "line_length": 80,
|
||||
// "heading_line_length": 80,
|
||||
// "code_block_line_length": 80,
|
||||
// "code_blocks": false,
|
||||
// "tables": false,
|
||||
// "headings": true,
|
||||
// "strict": false
|
||||
// // "stern": false
|
||||
// },
|
||||
// MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
|
||||
"MD024": {
|
||||
// Only check sibling headings
|
||||
"siblings_only": true
|
||||
// allow_different_nesting, an alternative
|
||||
},
|
||||
// MD033/no-inline-html - Inline HTML
|
||||
"MD033": {
|
||||
"allowed_elements": [
|
||||
"details", "summary",
|
||||
"kbd"
|
||||
]
|
||||
},
|
||||
// MD034/no-bare-urls - Bare URL used
|
||||
"MD034": false
|
||||
}
|
||||
6
.vscodeignore
Normal file
6
.vscodeignore
Normal file
@ -0,0 +1,6 @@
|
||||
.vscode/**
|
||||
.vscode-test/**
|
||||
.gitignore
|
||||
.editorconfig
|
||||
.markdownlint.jsonc
|
||||
samples/
|
||||
28
CHANGELOG.md
Executable file → Normal file
28
CHANGELOG.md
Executable file → Normal file
@ -1,7 +1,35 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to the "vscode-theme-onelight" extension will be documented in this file.
|
||||
|
||||
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
|
||||
|
||||
## [1.0.0]
|
||||
### Changed
|
||||
- Re-publish from original archived repo
|
||||
|
||||
|
||||
## Unreleased
|
||||
|
||||
## [0.2.1]
|
||||
|
||||
### Changed
|
||||
|
||||
- Project unmaintained
|
||||
|
||||
## [0.2.0]
|
||||
|
||||
### Changed
|
||||
|
||||
- Change UI theme from VSCode default to Github Light Default
|
||||
- One Light style terminal colors
|
||||
|
||||
## [0.1.0]
|
||||
|
||||
- Initial release
|
||||
|
||||
[1.0.0]: https://git.isliberty.me/abby/vscode-theme-onelight/src/tag/v1.0.0
|
||||
[Unreleased]: https://github.com/laggardkernel/vscode-theme-onelight/compare/v0.2.1..master
|
||||
[0.2.1]: https://github.com/laggardkernel/vscode-theme-onelight/compare/v0.2.0..v0.2.1
|
||||
[0.2.0]: https://github.com/laggardkernel/vscode-theme-onelight/compare/v0.1.0..v0.2.0
|
||||
[0.1.0]: https://github.com/laggardkernel/vscode-theme-onelight/releases/tag/v0.1.0
|
||||
|
||||
19
LICENSE
Normal file
19
LICENSE
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright 2021 AbbyCin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
212
README.md
212
README.md
@ -1,4 +1,214 @@
|
||||
# One Light Italic
|
||||
# One Light Italic2
|
||||
|
||||
slightly modifed of the following theme
|
||||
|
||||
# [One Light Italic](https://github.com/laggardkernel/vscode-theme-onelight)
|
||||
|
||||
**Project unmaintained**.
|
||||
|
||||
I recommend the [Yi Theme][yi-theme] for you. It is the only true port of
|
||||
Atom's One theme I've known. Most all of the other Atom one light themes
|
||||
use the `.tmTheme` color format or a direct json conversion of this format.
|
||||
(`.tmTheme` stands for TextMate theme, some editors like Sublime and VSCode
|
||||
have support for this legacy format.)
|
||||
|
||||
It looks like the [Yi Theme][yi-theme] stands out from all the other Atom themes
|
||||
(not only the light ones) cause
|
||||
|
||||
- It's a true port from Atom's One theme based on the source code of Atom
|
||||
- It includes both light and dark themes
|
||||
- It covers not only the text syntax color, but also colors for the other part
|
||||
of the VSCode UI, like workbench.
|
||||
|
||||
It's a pity that Yi Theme doesn't include "Atom One" in its name and doesn't
|
||||
appear in the search result of keyword like "atom one theme" in the marketplace.
|
||||
|
||||
For anyone like the italic syntax in this color theme, use following
|
||||
*token color customization* settings.
|
||||
|
||||
<details>
|
||||
<summary>editor.tokenColorCustomizations</summary>
|
||||
|
||||
```jsonc
|
||||
"editor.tokenColorCustomizations": {
|
||||
"textMateRules": [
|
||||
{ // from Atom One Dark
|
||||
"name": "js/ts italic",
|
||||
"scope":[
|
||||
// Why not attribute-name, .html, .pseudo-class.css
|
||||
"entity.other.attribute-name.js",
|
||||
"entity.other.attribute-name.ts",
|
||||
"entity.other.attribute-name.jsx",
|
||||
"entity.other.attribute-name.tsx",
|
||||
// "variable.parameter", // TODO: too generic
|
||||
"variable.language.super",
|
||||
],
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{ // from ejeldes.one-dark-italic-theme
|
||||
"name": "js ts this",
|
||||
"scope": [
|
||||
"var.this",
|
||||
"variable.language.this.js",
|
||||
"variable.language.this.ts",
|
||||
"variable.language.this.jsx",
|
||||
"variable.language.this.tsx",
|
||||
],
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "name": "comment",
|
||||
// "scope": "comment.line.double-slash,comment.block.documentation",
|
||||
// "settings": {
|
||||
// "fontStyle": "italic"
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
{ // from laggardkernel.vscode-theme-onelight
|
||||
"name": "Italic",
|
||||
"scope": [
|
||||
"comment",
|
||||
"comment.block variable.parameter",
|
||||
"comment.block",
|
||||
"comment.block.documentation entity.name.type",
|
||||
"comment.block.documentation punctuation.definition",
|
||||
"comment.block.documentation variable",
|
||||
"comment.block.documentation",
|
||||
"constant.language",
|
||||
"entity.name.class",
|
||||
"entity.other.attribute-name",
|
||||
"keyword",
|
||||
"keyword.operator.expression",
|
||||
"keyword.operator.new",
|
||||
"keyword.other.documentation",
|
||||
"keyword.other.phpdoc",
|
||||
"markup.changed",
|
||||
"markup.deleted",
|
||||
"markup.inserted",
|
||||
"markup.italic",
|
||||
"markup.quote",
|
||||
"punctuation.definition.comment",
|
||||
"punctuation.definition.italic",
|
||||
"storage",
|
||||
"storage.type.class.jsdoc",
|
||||
"string.comment",
|
||||
"variable.language",
|
||||
//
|
||||
// "variable.parameter",
|
||||
],
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{ // From laggardkernel.vscode-theme-onelight
|
||||
"name": "No Italic",
|
||||
"scope": [
|
||||
"entity.name.tag",
|
||||
"keyword.operator",
|
||||
"keyword.other.unit",
|
||||
"keyword.other.special-method",
|
||||
"support.type.property-name",
|
||||
],
|
||||
"settings": {
|
||||
"fontStyle": "" // empty for normal
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Besides, here's also my custom terminal color definition. A modified version of
|
||||
base16 "One Light" and "Onedark". Just put it here in case anyone wanna have
|
||||
a try.
|
||||
|
||||
<details>
|
||||
<summary>terminal color customization</summary>
|
||||
|
||||
```jsonc
|
||||
"terminal.integrated.drawBoldTextInBrightColors": false,
|
||||
// One Half Light modified, based on https://glitchbone.github.io/vscode-base16-term/
|
||||
"workbench.colorCustomizations": {
|
||||
"[Yi Light]": {
|
||||
"terminal.foreground": "#383a42",
|
||||
"terminal.background": "#fafafa",
|
||||
// "terminal.selectionForeground": "#383a42",
|
||||
"terminal.selectionBackground": "#bfceff",
|
||||
"terminalCursor.foreground": "#cc00be",
|
||||
"terminal.border": "#657b83",
|
||||
"terminal.ansiBlack": "#383a42",
|
||||
"terminal.ansiRed": "#e45649",
|
||||
"terminal.ansiGreen": "#50a14f",
|
||||
"terminal.ansiYellow": "#c18401",
|
||||
"terminal.ansiBlue": "#2f5af3",
|
||||
"terminal.ansiMagenta": "#a626a4",
|
||||
"terminal.ansiCyan": "#00b7eb",
|
||||
"terminal.ansiWhite": "#fafafa",
|
||||
"terminal.ansiBrightBlack": "#797979",
|
||||
"terminal.ansiBrightRed": "#e06c75",
|
||||
"terminal.ansiBrightGreen": "#98c379",
|
||||
"terminal.ansiBrightYellow": "#e5c07b",
|
||||
"terminal.ansiBrightBlue": "#4b72ff",
|
||||
"terminal.ansiBrightMagenta": "#c678dd",
|
||||
"terminal.ansiBrightCyan": "#00b7eb",
|
||||
"terminal.ansiBrightWhite": "#fafafa",
|
||||
},
|
||||
"[Yi Dark]": {
|
||||
"terminal.foreground": "#dcdfe4",
|
||||
"terminal.background": "#282c34",
|
||||
// "terminal.selectionForeground": "#dcdfe4",
|
||||
"terminal.selectionBackground": "#454D95",
|
||||
"terminalCursor.foreground": "#cc00be",
|
||||
"terminal.border": "#555555",
|
||||
"terminal.ansiBlack": "#282c34",
|
||||
"terminal.ansiRed": "#e06c75",
|
||||
"terminal.ansiGreen": "#98c379",
|
||||
"terminal.ansiYellow": "#e5c07b",
|
||||
"terminal.ansiBlue": "#61afef",
|
||||
"terminal.ansiMagenta": "#c678dd",
|
||||
"terminal.ansiCyan": "#56b6c2",
|
||||
"terminal.ansiWhite": "#dcdfe4",
|
||||
"terminal.ansiBrightBlack": "#5d677a",
|
||||
"terminal.ansiBrightRed": "#e06c75",
|
||||
"terminal.ansiBrightGreen": "#98c379",
|
||||
"terminal.ansiBrightYellow": "#e5c07b",
|
||||
"terminal.ansiBrightBlue": "#61afef",
|
||||
"terminal.ansiBrightMagenta": "#c678dd",
|
||||
"terminal.ansiBrightCyan": "#56b6c2",
|
||||
"terminal.ansiBrightWhite": "#dcdfe4",
|
||||
},
|
||||
},
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
Atom one light theme with italic support for VSCode.
|
||||
|
||||
[Github Repo](https://github.com/laggardkernel/vscode-theme-onelight)
|
||||
|
||||
Althought this them defines light ansi colors for terminal, it's designed to
|
||||
be used by TUI apps but not the shell itself.
|
||||
|
||||
```json
|
||||
"terminal.integrated.drawBoldTextInBrightColors": false,
|
||||
```
|
||||
|
||||
## Ref
|
||||
|
||||
- [How to make your own VS Code theme!](https://www.youtube.com/watch?v=pGzssFNtWXw)
|
||||
- [VSCode Color Theme Guide](https://code.visualstudio.com/api/extension-guides/color-theme)
|
||||
- [VSCode Color Theme Reference](https://code.visualstudio.com/api/references/theme-color)
|
||||
- [VSCode Publish Extensions Guide](https://code.visualstudio.com/api/working-with-extensions/publishing-extension)
|
||||
- [One Light tmTheme](https://github.com/akamud/vscode-theme-onelight/blob/master/themes/OneLight.old.tmTheme)
|
||||
- [One Half Light tmTheme](https://tmtheme-editor.herokuapp.com/#!/editor/theme/One%20Half%20Light)
|
||||
- [GitHub's VS Code themes](https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme)
|
||||
- [atom one-light-syntax](https://github.com/atom/atom/tree/master/packages/one-light-syntax)
|
||||
|
||||
[yi-theme]: https://marketplace.visualstudio.com/items?itemName=wangweixuan.yithemes
|
||||
|
||||
25
package.json
25
package.json
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "vscode-theme-onelight",
|
||||
"displayName": "One Light Italic",
|
||||
"name": "vscode-onelight2",
|
||||
"displayName": "One Light Italic2",
|
||||
"description": "One light theme with italic support for VSCode",
|
||||
"version": "0.1.0",
|
||||
"publisher": "laggardkernel",
|
||||
"version": "1.0.0",
|
||||
"publisher": "AbbyCin",
|
||||
"engines": {
|
||||
"vscode": "^1.12.0"
|
||||
},
|
||||
@ -22,21 +22,18 @@
|
||||
"atom"
|
||||
],
|
||||
"contributes": {
|
||||
"themes": [{
|
||||
"label": "Atom One Half Light",
|
||||
"uiTheme": "vs",
|
||||
"path": "./themes/one-half-light.json"
|
||||
},
|
||||
"themes": [
|
||||
{
|
||||
"label": "Atom One Light",
|
||||
"label": "Atom One Light2",
|
||||
"uiTheme": "vs",
|
||||
"path": "./themes/one-light.json"
|
||||
"path": "./themes/one-light-italic.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"homepage": "https://github.com/laggardkernel/vscode-theme-onelight",
|
||||
"homepage": "https://git.isliberty.me/abby/vscode-theme-onelight",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laggardkernel/vscode-theme-onelight"
|
||||
}
|
||||
"url": "https://git.isliberty.me/abby/vscode-theme-onelight"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
161
samples/c++.cpp
Normal file
161
samples/c++.cpp
Normal file
@ -0,0 +1,161 @@
|
||||
#include "ContactsModel.h"
|
||||
#include "core/IdentityManager.h"
|
||||
#include "core/ContactsManager.h"
|
||||
#include <QDebug>
|
||||
|
||||
inline bool contactSort(const ContactUser *c1, const ContactUser *c2)
|
||||
{
|
||||
if (c1->status() != c2->status())
|
||||
return c1->status() < c2->status();
|
||||
return c1->nickname().localeAwareCompare(c2->nickname()) < 0;
|
||||
}
|
||||
|
||||
ContactsModel::ContactsModel(QObject *parent)
|
||||
: QAbstractListModel(parent), m_identity(0)
|
||||
{
|
||||
}
|
||||
|
||||
void ContactsModel::setIdentity(UserIdentity *identity)
|
||||
{
|
||||
if (identity == m_identity)
|
||||
return;
|
||||
|
||||
beginResetModel();
|
||||
|
||||
foreach (ContactUser *user, contacts)
|
||||
user->disconnect(this);
|
||||
contacts.clear();
|
||||
|
||||
if (m_identity) {
|
||||
disconnect(m_identity, 0, this, 0);
|
||||
disconnect(&m_identity->contacts, 0, this, 0);
|
||||
}
|
||||
|
||||
m_identity = identity;
|
||||
|
||||
if (m_identity) {
|
||||
connect(&identity->contacts, SIGNAL(contactAdded(ContactUser*)), SLOT(contactAdded(ContactUser*)));
|
||||
|
||||
contacts = identity->contacts.contacts();
|
||||
std::sort(contacts.begin(), contacts.end(), contactSort);
|
||||
|
||||
foreach (ContactUser *user, contacts)
|
||||
connectSignals(user);
|
||||
}
|
||||
|
||||
endResetModel();
|
||||
emit identityChanged();
|
||||
}
|
||||
|
||||
QModelIndex ContactsModel::indexOfContact(ContactUser *user) const
|
||||
{
|
||||
int row = contacts.indexOf(user);
|
||||
if (row < 0)
|
||||
return QModelIndex();
|
||||
return index(row, 0);
|
||||
}
|
||||
|
||||
ContactUser *ContactsModel::contact(int row) const
|
||||
{
|
||||
return contacts.value(row);
|
||||
}
|
||||
|
||||
void ContactsModel::updateUser(ContactUser *user)
|
||||
{
|
||||
if (!user)
|
||||
{
|
||||
user = qobject_cast<ContactUser*>(sender());
|
||||
if (!user)
|
||||
return;
|
||||
}
|
||||
|
||||
int row = contacts.indexOf(user);
|
||||
if (row < 0)
|
||||
{
|
||||
user->disconnect(this);
|
||||
return;
|
||||
}
|
||||
|
||||
QList<ContactUser*> sorted = contacts;
|
||||
std::sort(sorted.begin(), sorted.end(), contactSort);
|
||||
int newRow = sorted.indexOf(user);
|
||||
|
||||
if (row != newRow)
|
||||
{
|
||||
beginMoveRows(QModelIndex(), row, row, QModelIndex(), (newRow > row) ? (newRow+1) : newRow);
|
||||
contacts = sorted;
|
||||
endMoveRows();
|
||||
}
|
||||
emit dataChanged(index(newRow, 0), index(newRow, 0));
|
||||
}
|
||||
|
||||
void ContactsModel::connectSignals(ContactUser *user)
|
||||
{
|
||||
connect(user, SIGNAL(statusChanged()), SLOT(updateUser()));
|
||||
connect(user, SIGNAL(nicknameChanged()), SLOT(updateUser()));
|
||||
connect(user, SIGNAL(contactDeleted(ContactUser*)), SLOT(contactRemoved(ContactUser*)));
|
||||
}
|
||||
|
||||
void ContactsModel::contactAdded(ContactUser *user)
|
||||
{
|
||||
Q_ASSERT(!indexOfContact(user).isValid());
|
||||
|
||||
connectSignals(user);
|
||||
|
||||
QList<ContactUser*>::Iterator lp = qLowerBound(contacts.begin(), contacts.end(), user, contactSort);
|
||||
int row = lp - contacts.begin();
|
||||
|
||||
beginInsertRows(QModelIndex(), row, row);
|
||||
contacts.insert(lp, user);
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
void ContactsModel::contactRemoved(ContactUser *user)
|
||||
{
|
||||
if (!user && !(user = qobject_cast<ContactUser*>(sender())))
|
||||
return;
|
||||
|
||||
int row = contacts.indexOf(user);
|
||||
beginRemoveRows(QModelIndex(), row, row);
|
||||
contacts.removeAt(row);
|
||||
endRemoveRows();
|
||||
|
||||
disconnect(user, 0, this, 0);
|
||||
}
|
||||
|
||||
QHash<int,QByteArray> ContactsModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[Qt::DisplayRole] = "name";
|
||||
roles[PointerRole] = "contact";
|
||||
roles[StatusRole] = "status";
|
||||
return roles;
|
||||
}
|
||||
|
||||
int ContactsModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
if (parent.isValid())
|
||||
return 0;
|
||||
return contacts.size();
|
||||
}
|
||||
|
||||
QVariant ContactsModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid() || index.row() >= contacts.size())
|
||||
return QVariant();
|
||||
|
||||
ContactUser *user = contacts[index.row()];
|
||||
|
||||
switch (role)
|
||||
{
|
||||
case Qt::DisplayRole:
|
||||
case Qt::EditRole:
|
||||
return user->nickname();
|
||||
case PointerRole:
|
||||
return QVariant::fromValue(user);
|
||||
case StatusRole:
|
||||
return user->status();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
66
samples/c-sharp.cs
Normal file
66
samples/c-sharp.cs
Normal file
@ -0,0 +1,66 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Abp.Domain.Entities;
|
||||
using Abp.Domain.Repositories;
|
||||
|
||||
namespace Abp.MemoryDb.Repositories
|
||||
{
|
||||
//TODO: Implement thread-safety..?
|
||||
public class MemoryRepository<TEntity, TPrimaryKey> : AbpRepositoryBase<TEntity, TPrimaryKey>
|
||||
where TEntity : class, IEntity<TPrimaryKey>
|
||||
{
|
||||
private readonly IMemoryDatabaseProvider _databaseProvider;
|
||||
protected MemoryDatabase Database { get { return _databaseProvider.Database; } }
|
||||
|
||||
protected List<TEntity> Table { get { return Database.Set<TEntity>(); } }
|
||||
|
||||
private readonly MemoryPrimaryKeyGenerator<TPrimaryKey> _primaryKeyGenerator;
|
||||
|
||||
public MemoryRepository(IMemoryDatabaseProvider databaseProvider)
|
||||
{
|
||||
_databaseProvider = databaseProvider;
|
||||
_primaryKeyGenerator = new MemoryPrimaryKeyGenerator<TPrimaryKey>();
|
||||
}
|
||||
|
||||
public override IQueryable<TEntity> GetAll()
|
||||
{
|
||||
return Table.AsQueryable();
|
||||
}
|
||||
|
||||
public override TEntity Insert(TEntity entity)
|
||||
{
|
||||
if (entity.IsTransient())
|
||||
{
|
||||
entity.Id = _primaryKeyGenerator.GetNext();
|
||||
}
|
||||
|
||||
Table.Add(entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
public override TEntity Update(TEntity entity)
|
||||
{
|
||||
var index = Table.FindIndex(e => EqualityComparer<TPrimaryKey>.Default.Equals(e.Id, entity.Id));
|
||||
if (index >= 0)
|
||||
{
|
||||
Table[index] = entity;
|
||||
}
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
public override void Delete(TEntity entity)
|
||||
{
|
||||
Delete(entity.Id);
|
||||
}
|
||||
|
||||
public override void Delete(TPrimaryKey id)
|
||||
{
|
||||
var index = Table.FindIndex(e => EqualityComparer<TPrimaryKey>.Default.Equals(e.Id, id));
|
||||
if (index >= 0)
|
||||
{
|
||||
Table.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
88
samples/c.c
Normal file
88
samples/c.c
Normal file
@ -0,0 +1,88 @@
|
||||
/* stringmerge.c -- Given two sorted files of strings, it creates
|
||||
* a sorted file consisting of all their elements.
|
||||
* The names of the files are passed as command
|
||||
* line parameters.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#define MAXBUFFER 128
|
||||
|
||||
int getline(FILE * fd, char buff[], int nmax){
|
||||
/* It reads a line from fd and stores up to nmax of
|
||||
* its characters to buff.
|
||||
*/
|
||||
char c;
|
||||
int n=0;
|
||||
|
||||
while ((c=getc(fd))!='\n'){
|
||||
if(c==EOF)return EOF;
|
||||
if(n<nmax)
|
||||
buff[n++]=c;
|
||||
}
|
||||
buff[n]='\0';
|
||||
return n;
|
||||
}
|
||||
|
||||
int stringMerge(char filename1[], char filename2[] , char filename3[]) {
|
||||
/* Given two sorted files of strings, called filename1 and filename2,
|
||||
* it writes their merged sequence to the file filename3.
|
||||
* It returns the total number of strings written to filename3.
|
||||
*/
|
||||
FILE *fd1, *fd2, *fd3;
|
||||
char buffer1[MAXBUFFER], buffer2[MAXBUFFER];
|
||||
int ln1, ln2;
|
||||
int n=0;
|
||||
|
||||
if ((fd1=fopen(filename1, "r"))==NULL) {
|
||||
perror("fopen");
|
||||
exit(1);
|
||||
}
|
||||
if ((fd2=fopen(filename2, "r"))==NULL) {
|
||||
perror("fopen");
|
||||
exit(1);
|
||||
}
|
||||
if ((fd3=fopen(filename3, "w"))==NULL) {
|
||||
perror("fopen");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ln1 = getline(fd1,buffer1,MAXBUFFER-1);
|
||||
ln2 = getline(fd2,buffer2,MAXBUFFER-1);
|
||||
|
||||
while ((ln1!=EOF) && (ln2!=EOF)){
|
||||
if (strcmp(buffer1,buffer2)<=0){
|
||||
fprintf(fd3, "%s\n", buffer1);
|
||||
ln1 = getline(fd1,buffer1,MAXBUFFER-1);
|
||||
}else{
|
||||
fprintf(fd3, "%s\n", buffer2);
|
||||
ln2 = getline(fd2,buffer2,MAXBUFFER-1);
|
||||
}
|
||||
n++;
|
||||
}
|
||||
|
||||
while (ln1!=EOF){
|
||||
fprintf(fd3, "%s\n", buffer1);
|
||||
ln1=getline(fd1,buffer1,MAXBUFFER-1);
|
||||
n++;
|
||||
}
|
||||
|
||||
while (ln2!=EOF){
|
||||
fprintf(fd3, "%s\n", buffer2);
|
||||
ln2=getline(fd2,buffer2,MAXBUFFER-1);
|
||||
n++;
|
||||
}
|
||||
|
||||
fclose(fd1);
|
||||
fclose(fd2);
|
||||
fclose(fd3);
|
||||
return n;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if(argc!=4){
|
||||
printf("Usage: %s sortedfile1 sortedfile2 mergefile\n", argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
printf("We have %d merged records\n",
|
||||
stringMerge(argv[1], argv[2], argv[3]));
|
||||
}
|
||||
71
samples/coffee.coffee
Normal file
71
samples/coffee.coffee
Normal file
@ -0,0 +1,71 @@
|
||||
Application.directive "scopeBar", [], ->
|
||||
replace: true
|
||||
templateUrl: 'partials/scope_bar'
|
||||
|
||||
link: (scope, element, attr) ->
|
||||
preview = element.prev()
|
||||
preview.bind "mouseover", (event) ->
|
||||
active = {}
|
||||
active.scope = event.target.dataset.entityScope
|
||||
|
||||
if active.scope
|
||||
active_scope_rule = getScopeSettings(active.scope)
|
||||
active.name = active_scope_rule.name if active_scope_rule
|
||||
|
||||
scope.$apply ->
|
||||
# Highlight in sidebar
|
||||
scope.$parent.hovered_rule = active_scope_rule
|
||||
|
||||
preview.bind "mouseout", (event) ->
|
||||
# Unhighlight in sidebar
|
||||
scope.$parent.hovered_rule = null
|
||||
|
||||
preview.bind "dblclick", (event) ->
|
||||
active = {}
|
||||
active.scope = event.target.dataset.entityScope
|
||||
|
||||
if active.scope
|
||||
active_scope_rule = getScopeSettings(active.scope)
|
||||
showPopover active_scope_rule, event
|
||||
|
||||
|
||||
|
||||
showPopover = (rule, event) ->
|
||||
scope.$apply ->
|
||||
scope.$parent.new_popover_visible = false
|
||||
scope.$parent.popover_rule = rule
|
||||
scope.$parent.edit_popover_visible = true
|
||||
|
||||
popover = $("#edit-popover")
|
||||
|
||||
if popover.is('.slide')
|
||||
left_offset = $("#gallery").width()
|
||||
else
|
||||
left_offset = 0
|
||||
|
||||
offset =
|
||||
left: (popover.width() / 2) + 10 + left_offset
|
||||
top: 24
|
||||
|
||||
popover.css({
|
||||
"left": event.pageX - offset.left
|
||||
"top": event.pageY + offset.top
|
||||
}).addClass("on-bottom")
|
||||
|
||||
|
||||
getScopeSettings = (active_scope) ->
|
||||
return unless scope.$parent.jsonTheme.settings
|
||||
|
||||
return scope.$parent.jsonTheme.settings.find (item) ->
|
||||
return unless item.scope
|
||||
|
||||
item_scopes = item.scope.split(', ')
|
||||
|
||||
match = item_scopes.filter (item_scope) ->
|
||||
item_scopes_arr = item_scope.split('.')
|
||||
active_scope_arr = active_scope.split('.')
|
||||
|
||||
return (item_scopes_arr.subtract active_scope_arr).length < 1
|
||||
|
||||
return item if match.length
|
||||
|
||||
77
samples/css.css
Normal file
77
samples/css.css
Normal file
@ -0,0 +1,77 @@
|
||||
body {
|
||||
font-family: arial;
|
||||
}
|
||||
|
||||
h1, p, table {
|
||||
background-color:#CCC;
|
||||
border: 1px solid;
|
||||
color:#39F;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Bootstrap snipit */
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.hidden-md,
|
||||
tr.hidden-md,
|
||||
th.hidden-md,
|
||||
td.hidden-md {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
|
||||
@-webkit-keyframes pulse {
|
||||
50% {
|
||||
-webkit-transform: scale(1.1);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
@keyframes pulse {
|
||||
50% {
|
||||
-webkit-transform: scale(1.1);
|
||||
-ms-transform: scale(1.1);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
.pulse {
|
||||
-webkit-animation-name: pulse;
|
||||
animation-name: pulse;
|
||||
}
|
||||
|
||||
.addon-store .pagehead h1 { display: inline-block }
|
||||
.addon-store .addon-summary:after { clear: both }
|
||||
|
||||
.addon-store .addon-icon {
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.15);
|
||||
float: left;
|
||||
height: 80px;
|
||||
margin-right: 14px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.addon-store .developer-callout {
|
||||
background-color: #f1f1f1;
|
||||
background-image: -moz-linear-gradient(#fafafa, #f1f1f1);
|
||||
background-image: -webkit-linear-gradient(#fafafa, #f1f1f1);
|
||||
background-image: linear-gradient(#fafafa, #f1f1f1);
|
||||
background-repeat: repeat-x;
|
||||
border: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 1px 0 #fff, 0 1px 5px #f1f1f1;
|
||||
margin-top: 40px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
99
samples/erlang.erl
Normal file
99
samples/erlang.erl
Normal file
@ -0,0 +1,99 @@
|
||||
-module(cowboy_protocol).
|
||||
|
||||
%% API.
|
||||
-export([start_link/4]).
|
||||
|
||||
%% Internal.
|
||||
-export([init/4]).
|
||||
-export([parse_request/3]).
|
||||
-export([resume/6]).
|
||||
|
||||
-type opts() :: [{compress, boolean()}
|
||||
| {env, cowboy_middleware:env()}
|
||||
| {max_empty_lines, non_neg_integer()}
|
||||
| {max_header_name_length, non_neg_integer()}
|
||||
| {max_header_value_length, non_neg_integer()}
|
||||
| {max_headers, non_neg_integer()}
|
||||
| {max_keepalive, non_neg_integer()}
|
||||
| {max_request_line_length, non_neg_integer()}
|
||||
| {middlewares, [module()]}
|
||||
| {onresponse, cowboy:onresponse_fun()}
|
||||
| {timeout, timeout()}].
|
||||
-export_type([opts/0]).
|
||||
|
||||
-record(state, {
|
||||
socket :: inet:socket(),
|
||||
transport :: module(),
|
||||
middlewares :: [module()],
|
||||
compress :: boolean(),
|
||||
env :: cowboy_middleware:env(),
|
||||
onresponse = undefined :: undefined | cowboy:onresponse_fun(),
|
||||
max_empty_lines :: non_neg_integer(),
|
||||
req_keepalive = 1 :: non_neg_integer(),
|
||||
max_keepalive :: non_neg_integer(),
|
||||
max_request_line_length :: non_neg_integer(),
|
||||
max_header_name_length :: non_neg_integer(),
|
||||
max_header_value_length :: non_neg_integer(),
|
||||
max_headers :: non_neg_integer(),
|
||||
timeout :: timeout(),
|
||||
until :: non_neg_integer() | infinity
|
||||
}).
|
||||
|
||||
-include_lib("cowlib/include/cow_inline.hrl").
|
||||
-include_lib("cowlib/include/cow_parse.hrl").
|
||||
|
||||
%% API.
|
||||
|
||||
-spec start_link(ranch:ref(), inet:socket(), module(), opts()) -> {ok, pid()}.
|
||||
start_link(Ref, Socket, Transport, Opts) ->
|
||||
Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),
|
||||
{ok, Pid}.
|
||||
|
||||
%% Internal.
|
||||
|
||||
%% Faster alternative to proplists:get_value/3.
|
||||
get_value(Key, Opts, Default) ->
|
||||
case lists:keyfind(Key, 1, Opts) of
|
||||
{_, Value} -> Value;
|
||||
_ -> Default
|
||||
end.
|
||||
|
||||
-spec init(ranch:ref(), inet:socket(), module(), opts()) -> ok.
|
||||
init(Ref, Socket, Transport, Opts) ->
|
||||
ok = ranch:accept_ack(Ref),
|
||||
Timeout = get_value(timeout, Opts, 5000),
|
||||
Until = until(Timeout),
|
||||
case recv(Socket, Transport, Until) of
|
||||
{ok, Data} ->
|
||||
OnFirstRequest = get_value(onfirstrequest, Opts, undefined),
|
||||
case OnFirstRequest of
|
||||
undefined -> ok;
|
||||
_ -> OnFirstRequest(Ref, Socket, Transport, Opts)
|
||||
end,
|
||||
Compress = get_value(compress, Opts, false),
|
||||
MaxEmptyLines = get_value(max_empty_lines, Opts, 5),
|
||||
MaxHeaderNameLength = get_value(max_header_name_length, Opts, 64),
|
||||
MaxHeaderValueLength = get_value(max_header_value_length, Opts, 4096),
|
||||
MaxHeaders = get_value(max_headers, Opts, 100),
|
||||
MaxKeepalive = get_value(max_keepalive, Opts, 100),
|
||||
MaxRequestLineLength = get_value(max_request_line_length, Opts, 4096),
|
||||
Middlewares = get_value(middlewares, Opts, [cowboy_router, cowboy_handler]),
|
||||
Env = [{listener, Ref}|get_value(env, Opts, [])],
|
||||
OnResponse = get_value(onresponse, Opts, undefined),
|
||||
parse_request(Data, #state{socket=Socket, transport=Transport,
|
||||
middlewares=Middlewares, compress=Compress, env=Env,
|
||||
max_empty_lines=MaxEmptyLines, max_keepalive=MaxKeepalive,
|
||||
max_request_line_length=MaxRequestLineLength,
|
||||
max_header_name_length=MaxHeaderNameLength,
|
||||
max_header_value_length=MaxHeaderValueLength, max_headers=MaxHeaders,
|
||||
onresponse=OnResponse, timeout=Timeout, until=Until}, 0);
|
||||
{error, _} ->
|
||||
terminate(#state{socket=Socket, transport=Transport}) %% @todo ridiculous
|
||||
end.
|
||||
|
||||
-spec until(timeout()) -> non_neg_integer() | infinity.
|
||||
until(infinity) ->
|
||||
infinity;
|
||||
until(Timeout) ->
|
||||
{Me, S, Mi} = os:timestamp(),
|
||||
Me * 1000000000 + S * 1000 + Mi div 1000 + Timeout.
|
||||
84
samples/go.go
Normal file
84
samples/go.go
Normal file
@ -0,0 +1,84 @@
|
||||
// Reading and writing files are basic tasks needed for
|
||||
// many Go programs. First we'll look at some examples of
|
||||
// reading files.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Reading files requires checking most calls for errors.
|
||||
// This helper will streamline our error checks below.
|
||||
func check(e error) {
|
||||
if e != nil {
|
||||
panic(e)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
// Perhaps the most basic file reading task is
|
||||
// slurping a file's entire contents into memory.
|
||||
dat, err := ioutil.ReadFile("/tmp/dat")
|
||||
check(err)
|
||||
fmt.Print(string(dat))
|
||||
|
||||
// You'll often want more control over how and what
|
||||
// parts of a file are read. For these tasks, start
|
||||
// by `Open`ing a file to obtain an `os.File` value.
|
||||
f, err := os.Open("/tmp/dat")
|
||||
check(err)
|
||||
|
||||
// Read some bytes from the beginning of the file.
|
||||
// Allow up to 5 to be read but also note how many
|
||||
// actually were read.
|
||||
b1 := make([]byte, 5)
|
||||
n1, err := f.Read(b1)
|
||||
check(err)
|
||||
fmt.Printf("%d bytes: %s\n", n1, string(b1))
|
||||
|
||||
// You can also `Seek` to a known location in the file
|
||||
// and `Read` from there.
|
||||
o2, err := f.Seek(6, 0)
|
||||
check(err)
|
||||
b2 := make([]byte, 2)
|
||||
n2, err := f.Read(b2)
|
||||
check(err)
|
||||
fmt.Printf("%d bytes @ %d: %s\n", n2, o2, string(b2))
|
||||
|
||||
// The `io` package provides some functions that may
|
||||
// be helpful for file reading. For example, reads
|
||||
// like the ones above can be more robustly
|
||||
// implemented with `ReadAtLeast`.
|
||||
o3, err := f.Seek(6, 0)
|
||||
check(err)
|
||||
b3 := make([]byte, 2)
|
||||
n3, err := io.ReadAtLeast(f, b3, 2)
|
||||
check(err)
|
||||
fmt.Printf("%d bytes @ %d: %s\n", n3, o3, string(b3))
|
||||
|
||||
// There is no built-in rewind, but `Seek(0, 0)`
|
||||
// accomplishes this.
|
||||
_, err = f.Seek(0, 0)
|
||||
check(err)
|
||||
|
||||
// The `bufio` package implements a buffered
|
||||
// reader that may be useful both for its efficiency
|
||||
// with many small reads and because of the additional
|
||||
// reading methods it provides.
|
||||
r4 := bufio.NewReader(f)
|
||||
b4, err := r4.Peek(5)
|
||||
check(err)
|
||||
fmt.Printf("5 bytes: %s\n", string(b4))
|
||||
|
||||
// Close the file when you're done (usually this would
|
||||
// be scheduled immediately after `Open`ing with
|
||||
// `defer`).
|
||||
f.Close()
|
||||
|
||||
}
|
||||
71
samples/haskell.hs
Normal file
71
samples/haskell.hs
Normal file
@ -0,0 +1,71 @@
|
||||
module Main where
|
||||
|
||||
import Paths_postgrest (version)
|
||||
|
||||
import PostgREST.App
|
||||
import PostgREST.Middleware
|
||||
import PostgREST.Error(errResponse)
|
||||
|
||||
import Control.Monad (unless)
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
import Data.String.Conversions (cs)
|
||||
import Network.Wai (strictRequestBody)
|
||||
import Network.Wai.Middleware.Cors (cors)
|
||||
import Network.Wai.Handler.Warp hiding (Connection)
|
||||
import Network.Wai.Middleware.Gzip (gzip, def)
|
||||
import Network.Wai.Middleware.Static (staticPolicy, only)
|
||||
import Network.Wai.Middleware.RequestLogger (logStdout)
|
||||
import Data.List (intercalate)
|
||||
import Data.Version (versionBranch)
|
||||
import qualified Hasql as H
|
||||
import qualified Hasql.Postgres as P
|
||||
import Options.Applicative hiding (columns)
|
||||
|
||||
import PostgREST.Config (AppConfig(..), argParser, corsPolicy)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
let opts = info (helper <*> argParser) $
|
||||
fullDesc
|
||||
<> progDesc (
|
||||
"PostgREST "
|
||||
<> prettyVersion
|
||||
<> " / create a REST API to an existing Postgres database"
|
||||
)
|
||||
parserPrefs = prefs showHelpOnError
|
||||
conf <- customExecParser parserPrefs opts
|
||||
let port = configPort conf
|
||||
|
||||
unless (configSecure conf) $
|
||||
putStrLn "WARNING, running in insecure mode, auth will be in plaintext"
|
||||
unless ("secret" /= configJwtSecret conf) $
|
||||
putStrLn "WARNING, running in insecure mode, JWT secret is the default value"
|
||||
Prelude.putStrLn $ "Listening on port " ++
|
||||
(show $ configPort conf :: String)
|
||||
|
||||
let pgSettings = P.ParamSettings (cs $ configDbHost conf)
|
||||
(fromIntegral $ configDbPort conf)
|
||||
(cs $ configDbUser conf)
|
||||
(cs $ configDbPass conf)
|
||||
(cs $ configDbName conf)
|
||||
appSettings = setPort port
|
||||
. setServerName (cs $ "postgrest/" <> prettyVersion)
|
||||
$ defaultSettings
|
||||
middle = logStdout
|
||||
. (if configSecure conf then redirectInsecure else id)
|
||||
. gzip def . cors corsPolicy
|
||||
. staticPolicy (only [("favicon.ico", "static/favicon.ico")])
|
||||
|
||||
poolSettings <- maybe (fail "Improper session settings") return $
|
||||
H.poolSettings (fromIntegral $ configPool conf) 30
|
||||
pool :: H.Pool P.Postgres
|
||||
<- H.acquirePool pgSettings poolSettings
|
||||
|
||||
runSettings appSettings $ middle $ \req respond -> do
|
||||
body <- strictRequestBody req
|
||||
resOrError <- liftIO $ H.session pool $ H.tx Nothing $
|
||||
authenticated conf (app conf body) req
|
||||
either (respond . errResponse) respond resOrError
|
||||
|
||||
where
|
||||
prettyVersion = intercalate "." $ map show $ versionBranch version
|
||||
71
samples/html.html
Normal file
71
samples/html.html
Normal file
@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<title>Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="./dist/css/bootstrap.css" rel="stylesheet">
|
||||
|
||||
<!-- Documentation extras -->
|
||||
<link href="./assets/css/docs.css" rel="stylesheet">
|
||||
<link href="./assets/css/pygments-manni.css" rel="stylesheet">
|
||||
|
||||
<link rel="shortcut icon" href="./assets/ico/favicon.png">
|
||||
</head>
|
||||
|
||||
<body class="bs-docs-home">
|
||||
|
||||
<!-- Docs master nav -->
|
||||
<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
|
||||
<div class="container">
|
||||
<a href="./" class="navbar-brand">Bootstrap 3 RC1</a>
|
||||
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="nav-collapse collapse bs-navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="./getting-started">Getting started</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./css">CSS</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./components">Components</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./javascript">JavaScript</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./customize">Customize</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page content of course! -->
|
||||
<div class="bs-masthead">
|
||||
<div class="container">
|
||||
<h1>Bootstrap 3</h1>
|
||||
<p class="lead">Sleek, intuitive, and powerful mobile-first front-end framework for faster and easier web development.</p>
|
||||
<p>
|
||||
<a href="http://getbootstrap.com/bs-v3.0.0-rc1-dist.zip" class="btn btn-bs btn-large" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 3.0.0 RC1']);">Download Bootstrap</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="./assets/js/jquery.js"></script>
|
||||
<script src="./dist/js/bootstrap.js"></script>
|
||||
<script src="./assets/js/holder.js"></script>
|
||||
<script src="./assets/js/application.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
81
samples/java.java
Normal file
81
samples/java.java
Normal file
@ -0,0 +1,81 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Life {
|
||||
public static void show(boolean[][] grid){
|
||||
String s = "";
|
||||
for(boolean[] row : grid){
|
||||
for(boolean val : row)
|
||||
if(val)
|
||||
s += "*";
|
||||
else
|
||||
s += ".";
|
||||
s += "\n";
|
||||
}
|
||||
System.out.println(s);
|
||||
}
|
||||
|
||||
public static boolean[][] gen(){
|
||||
boolean[][] grid = new boolean[10][10];
|
||||
for(int r = 0; r < 10; r++)
|
||||
for(int c = 0; c < 10; c++)
|
||||
if( Math.random() > 0.7 )
|
||||
grid[r][c] = true;
|
||||
return grid;
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
boolean[][] world = gen();
|
||||
show(world);
|
||||
System.out.println();
|
||||
world = nextGen(world);
|
||||
show(world);
|
||||
Scanner s = new Scanner(System.in);
|
||||
while(s.nextLine().length() == 0){
|
||||
System.out.println();
|
||||
world = nextGen(world);
|
||||
show(world);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean[][] nextGen(boolean[][] world){
|
||||
boolean[][] newWorld
|
||||
= new boolean[world.length][world[0].length];
|
||||
int num;
|
||||
for(int r = 0; r < world.length; r++){
|
||||
for(int c = 0; c < world[0].length; c++){
|
||||
num = numNeighbors(world, r, c);
|
||||
if( occupiedNext(num, world[r][c]) )
|
||||
newWorld[r][c] = true;
|
||||
}
|
||||
}
|
||||
return newWorld;
|
||||
}
|
||||
|
||||
public static boolean occupiedNext(int numNeighbors, boolean occupied){
|
||||
if( occupied && (numNeighbors == 2 || numNeighbors == 3))
|
||||
return true;
|
||||
else if (!occupied && numNeighbors == 3)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private static int numNeighbors(boolean[][] world, int row, int col) {
|
||||
int num = world[row][col] ? -1 : 0;
|
||||
for(int r = row - 1; r <= row + 1; r++)
|
||||
for(int c = col - 1; c <= col + 1; c++)
|
||||
if( inbounds(world, r, c) && world[r][c] )
|
||||
num++;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
private static boolean inbounds(boolean[][] world, int r, int c) {
|
||||
return r >= 0 && r < world.length && c >= 0 &&
|
||||
c < world[0].length;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
69
samples/js.js
Normal file
69
samples/js.js
Normal file
@ -0,0 +1,69 @@
|
||||
// Cross-browser xml parsing
|
||||
var parseXML = function( data ) {
|
||||
var xml, tmp;
|
||||
if ( !data || typeof data !== "string" ) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
if ( window.DOMParser ) { // Standard
|
||||
tmp = new DOMParser();
|
||||
xml = tmp.parseFromString( data , "text/xml" );
|
||||
} else { // IE
|
||||
xml = new ActiveXObject( "Microsoft.XMLDOM" );
|
||||
xml.async = false;
|
||||
xml.loadXML( data );
|
||||
}
|
||||
} catch( e ) {
|
||||
xml = undefined;
|
||||
}
|
||||
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
|
||||
jQuery.error( "Invalid XML: " + data );
|
||||
}
|
||||
return xml;
|
||||
};
|
||||
|
||||
// Bind a function to a context, optionally partially applying any arguments.
|
||||
var proxy = function( fn, context ) {
|
||||
var tmp, args, proxy;
|
||||
|
||||
if ( typeof context === "string" ) {
|
||||
tmp = fn[ context ];
|
||||
context = fn;
|
||||
fn = tmp;
|
||||
}
|
||||
|
||||
// Quick check to determine if target is callable, in the spec
|
||||
// this throws a TypeError, but we will just return undefined.
|
||||
if ( !jQuery.isFunction( fn ) ) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Simulated bind
|
||||
args = core_slice.call( arguments, 2 );
|
||||
proxy = function() {
|
||||
return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
|
||||
};
|
||||
|
||||
// Set the guid of unique handler to the same of original handler, so it can be removed
|
||||
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
||||
|
||||
return proxy;
|
||||
};
|
||||
|
||||
Sound.play = function() {}
|
||||
Sound.prototype = { something; }
|
||||
Sound.prototype.play = function() {}
|
||||
Sound.prototype.play = myfunc
|
||||
var parser = document.createElement('a');
|
||||
parser.href = "http://example.com:3000/pathname/?search=test#hash";
|
||||
parser.hostname; // => "example.com"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
43
samples/jsx.jsx
Normal file
43
samples/jsx.jsx
Normal file
@ -0,0 +1,43 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
|
||||
import HintOfLace from './components/HintOfLace';
|
||||
import theme from './theme';
|
||||
|
||||
class Fashion extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
knowFashion: false,
|
||||
fashionIsFriend: false,
|
||||
posing: 'like a swan',
|
||||
};
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
data: PropTypes.shape({
|
||||
jazzercise: PropTypes.string.isRequired,
|
||||
lipgloss: PropTypes.number.isRequired,
|
||||
}).isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const { jazzercise, lipgloss } = this.props;
|
||||
const { knowFashion, posing } = this.state;
|
||||
|
||||
return (
|
||||
<ThemeProvider theme={theme}>
|
||||
<h1>Hey! He-hey-hey! Hey!</h1>
|
||||
<HintOfLace
|
||||
lipgloss={lipgloss}
|
||||
posing={posing}
|
||||
knowFashion={knowFashion}
|
||||
jazzercise={jazzercise}
|
||||
/>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Fashion;
|
||||
43
samples/latex.tex
Normal file
43
samples/latex.tex
Normal file
@ -0,0 +1,43 @@
|
||||
\documentclass[12pt]{article}
|
||||
% options include 12pt or 11pt or 10pt
|
||||
% classes include article, report, book, letter, thesis
|
||||
|
||||
\title{This is the title}
|
||||
\author{Author One \\ Author Two}
|
||||
\date{29 February 2004}
|
||||
|
||||
\usepackage{pstricks}
|
||||
\setlength{\textheight}{12.5cm}
|
||||
\setlength{\textwidth}{16.0cm}
|
||||
|
||||
\newcommand{\cloud}[1]{
|
||||
\psset{unit=#1cm}
|
||||
\pspicture(2,4)
|
||||
\psarc(2,0){1.25}{210}{35}
|
||||
\psarc(0,0){1.25}{105}{320}
|
||||
\psarc(0.2,.75){.75}{45}{145}
|
||||
\psarc(1.8,.5){1.15}{5}{150}%
|
||||
\endpspicture
|
||||
}
|
||||
|
||||
\setlength{\parindent}{0mm}
|
||||
\setlength{\parskip}{5mm}
|
||||
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
This is the content of this document.
|
||||
|
||||
This is the 2nd paragraph.
|
||||
Here is an inline formula:
|
||||
$ V = \frac{4 \pi r^3}{3} $.
|
||||
And appearing immediately below
|
||||
is a displayed formula:
|
||||
$$ V = \frac{4 \pi r^3}{3} $$
|
||||
|
||||
This is a cloud size 0.3: ~ ~ ~ ~ ~ \cloud{0.3}
|
||||
|
||||
This is a cloud size 0.9: ~ ~ ~ ~ ~ \cloud{0.9}
|
||||
|
||||
\end{document}
|
||||
99
samples/lua.lua
Normal file
99
samples/lua.lua
Normal file
@ -0,0 +1,99 @@
|
||||
local IO = require "kong.tools.io"
|
||||
local utils = require "kong.tools.utils"
|
||||
local cache = require "kong.tools.database_cache"
|
||||
local stringy = require "stringy"
|
||||
local constants = require "kong.constants"
|
||||
local responses = require "kong.tools.responses"
|
||||
local timestamp = require "kong.tools.timestamp"
|
||||
|
||||
-- Define the plugins to load here, in the appropriate order
|
||||
local plugins = {}
|
||||
|
||||
local _M = {}
|
||||
|
||||
local function load_plugin_conf(api_id, consumer_id, plugin_name)
|
||||
local cache_key = cache.plugin_configuration_key(plugin_name, api_id, consumer_id)
|
||||
|
||||
local plugin = cache.get_and_set(cache_key, function()
|
||||
local rows, err = dao.plugins_configurations:find_by_keys {
|
||||
api_id = api_id,
|
||||
consumer_id = consumer_id ~= nil and consumer_id or constants.DATABASE_NULL_ID,
|
||||
name = plugin_name
|
||||
}
|
||||
if err then
|
||||
return responses.send_HTTP_INTERNAL_SERVER_ERROR(err)
|
||||
end
|
||||
|
||||
if #rows > 0 then
|
||||
return table.remove(rows, 1)
|
||||
else
|
||||
return { null = true }
|
||||
end
|
||||
end)
|
||||
|
||||
if plugin and not plugin.null and plugin.enabled then
|
||||
return plugin
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
local function init_plugins()
|
||||
configuration.plugins_available = configuration.plugins_available and configuration.plugins_available or {}
|
||||
|
||||
print("Discovering used plugins. Please wait..")
|
||||
local db_plugins, err = dao.plugins_configurations:find_distinct()
|
||||
if err then
|
||||
error(err)
|
||||
end
|
||||
|
||||
-- Checking that the plugins in the DB are also enabled
|
||||
for _, v in ipairs(db_plugins) do
|
||||
if not utils.table_contains(configuration.plugins_available, v) then
|
||||
error("You are using a plugin that has not been enabled in the configuration: "..v)
|
||||
end
|
||||
end
|
||||
|
||||
local unsorted_plugins = {} -- It's a multivalue table: k1 = {v1, v2, v3}, k2 = {...}
|
||||
|
||||
for _, v in ipairs(configuration.plugins_available) do
|
||||
local loaded, mod = utils.load_module_if_exists("kong.plugins."..v..".handler")
|
||||
if not loaded then
|
||||
error("The following plugin has been enabled in the configuration but is not installed on the system: "..v)
|
||||
else
|
||||
print("Loading plugin: "..v)
|
||||
local plugin_handler = mod()
|
||||
local priority = plugin_handler.PRIORITY and plugin_handler.PRIORITY or 0
|
||||
|
||||
-- Add plugin to the right priority
|
||||
local list = unsorted_plugins[priority]
|
||||
if not list then list = {} end -- The list is required in case more plugins share the same priority level
|
||||
table.insert(list, {
|
||||
name = v,
|
||||
handler = plugin_handler
|
||||
})
|
||||
unsorted_plugins[priority] = list
|
||||
end
|
||||
end
|
||||
|
||||
local result = {}
|
||||
|
||||
-- Now construct the final ordered plugin list
|
||||
-- resolver is always the first plugin as it is the one retrieving any needed information
|
||||
table.insert(result, {
|
||||
resolver = true,
|
||||
name = "resolver",
|
||||
handler = require("kong.resolver.handler")()
|
||||
})
|
||||
|
||||
-- Add the plugins in a sorted order
|
||||
for _, v in utils.sort_table_iter(unsorted_plugins, utils.sort.descending) do -- In descending order
|
||||
if v then
|
||||
for _, p in ipairs(v) do
|
||||
table.insert(result, p)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
171
samples/objc.m
Normal file
171
samples/objc.m
Normal file
@ -0,0 +1,171 @@
|
||||
#import "UIView+Facade.h"
|
||||
|
||||
@implementation UIView (Facade)
|
||||
|
||||
|
||||
#pragma mark - Alignment Relative To Superview
|
||||
|
||||
#pragma mark - Fill superview
|
||||
|
||||
- (void)fillSuperview {
|
||||
self.frame = CGRectMake(0, 0, CGRectGetWidth(self.superview.frame), CGRectGetHeight(self.superview.frame));
|
||||
}
|
||||
|
||||
#pragma mark - Corner alignment
|
||||
|
||||
- (void)anchorTopLeftWithLeftPadding:(CGFloat)left topPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(left, top, width, height);
|
||||
}
|
||||
|
||||
- (void)anchorTopRightWithRightPadding:(CGFloat)right topPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetWidth(self.superview.frame) - width - right, top, width, height);
|
||||
}
|
||||
|
||||
- (void)anchorBottomLeftWithLeftPadding:(CGFloat)left bottomPadding:(CGFloat)bottom width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(left, CGRectGetHeight(self.superview.frame) - height - bottom, width, height);
|
||||
}
|
||||
|
||||
- (void)anchorBottomRightWithRightPadding:(CGFloat)right bottomPadding:(CGFloat)bottom width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetWidth(self.superview.frame) - width - right, CGRectGetHeight(self.superview.frame) - height - bottom, width, height);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Center alignment
|
||||
|
||||
- (void)anchorInCenterWithWidth:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake((CGRectGetWidth(self.superview.frame) / 2.0) - (width / 2.0), (CGRectGetHeight(self.superview.frame) / 2.0) - (height / 2.0), width, height);
|
||||
}
|
||||
|
||||
- (void)anchorCenterLeftWithLeftPadding:(CGFloat)left width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(left, (CGRectGetHeight(self.superview.frame) / 2.0) - (height / 2.0), width, height);
|
||||
}
|
||||
|
||||
- (void)anchorCenterRightWithRightPadding:(CGFloat)right width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetWidth(self.superview.frame) - width - right, (CGRectGetHeight(self.superview.frame) / 2.0) - (height / 2.0), width, height);
|
||||
}
|
||||
|
||||
- (void)anchorTopCenterWithTopPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake((CGRectGetWidth(self.superview.frame) / 2.0) - (width / 2.0), top, width, height);
|
||||
}
|
||||
|
||||
- (void)anchorBottomCenterWithBottomPadding:(CGFloat)bottom width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake((CGRectGetWidth(self.superview.frame) / 2.0) - (width / 2.0), CGRectGetHeight(self.superview.frame) - height - bottom, width, height);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Filling width / height
|
||||
|
||||
- (void)anchorInCenterFillingWidthAndHeightWithLeftAndRightPadding:(CGFloat)leftAndRight topAndBottomPadding:(CGFloat)topAndBottom {
|
||||
self.frame = CGRectMake(leftAndRight, topAndBottom, CGRectGetWidth(self.superview.frame) - (2 * leftAndRight), CGRectGetHeight(self.superview.frame) - (2 * topAndBottom));
|
||||
}
|
||||
|
||||
- (void)anchorTopCenterFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight topPadding:(CGFloat)top height:(CGFloat)height {
|
||||
self.frame = CGRectMake(leftAndRight, top, CGRectGetWidth(self.superview.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
- (void)anchorBottomCenterFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight bottomPadding:(CGFloat)bottom height:(CGFloat)height {
|
||||
self.frame = CGRectMake(leftAndRight, CGRectGetHeight(self.superview.frame) - height - bottom, CGRectGetWidth(self.superview.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Alignment Relative to Siblings
|
||||
|
||||
#pragma mark - To the right
|
||||
|
||||
- (void)alignToTheRightOf:(UIView *)view matchingTopWithLeftPadding:(CGFloat)left width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(view.frame) + left, CGRectGetMinY(view.frame), width, height);
|
||||
}
|
||||
|
||||
- (void)alignToTheRightOf:(UIView *)view matchingTopAndFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(view.frame) + leftAndRight, CGRectGetMinY(view.frame), CGRectGetWidth(view.superview.frame) - CGRectGetMaxX(view.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
- (void)alignToTheRightOf:(UIView *)view matchingCenterWithLeftPadding:(CGFloat)left width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(view.frame) + left, CGRectGetMidY(view.frame) - (height / 2.0), width, height);
|
||||
}
|
||||
|
||||
- (void)alignToTheRightOf:(UIView *)view matchingCenterAndFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(view.frame) + leftAndRight, CGRectGetMidY(view.frame) - (height / 2.0), CGRectGetWidth(view.superview.frame) - CGRectGetMaxX(view.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
- (void)alignToTheRightOf:(UIView *)view matchingBottomWithLeftPadding:(CGFloat)left width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(view.frame) + left, CGRectGetMaxY(view.frame) - height, width, height);
|
||||
}
|
||||
|
||||
- (void)alignToTheRightOf:(UIView *)view matchingBottomAndFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(view.frame) + leftAndRight, CGRectGetMaxY(view.frame) - height, CGRectGetWidth(view.superview.frame) - CGRectGetMaxX(view.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - To the left
|
||||
|
||||
- (void)alignToTheLeftOf:(UIView *)view matchingTopWithRightPadding:(CGFloat)right width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMinX(view.frame) - width - right, CGRectGetMinY(view.frame), width, height);
|
||||
}
|
||||
|
||||
- (void)alignToTheLeftOf:(UIView *)view matchingTopAndFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight height:(CGFloat)height {
|
||||
self.frame = CGRectMake(leftAndRight, CGRectGetMinY(view.frame), CGRectGetMinX(view.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
- (void)alignToTheLeftOf:(UIView *)view matchingCenterWithRightPadding:(CGFloat)right width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMinX(view.frame) - width - right, CGRectGetMidY(view.frame) - (height / 2.0), width, height);
|
||||
}
|
||||
|
||||
- (void)alignToTheLeftOf:(UIView *)view matchingCenterAndFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight height:(CGFloat)height {
|
||||
self.frame = CGRectMake(leftAndRight, CGRectGetMidY(view.frame) - (height / 2.0), CGRectGetMinX(view.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
- (void)alignToTheLeftOf:(UIView *)view matchingBottomWithRightPadding:(CGFloat)right width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMinX(view.frame) - width - right, CGRectGetMaxY(view.frame) - height, width, height);
|
||||
}
|
||||
|
||||
- (void)alignToTheLeftOf:(UIView *)view matchingBottomAndFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight height:(CGFloat)height {
|
||||
self.frame = CGRectMake(leftAndRight, CGRectGetMaxY(view.frame) - height, CGRectGetMinX(view.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Under
|
||||
|
||||
- (void)alignUnder:(UIView *)view withLeftPadding:(CGFloat)left topPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(left, CGRectGetMaxY(view.frame) + top, width, height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view withRightPadding:(CGFloat)right topPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(self.superview.frame) - width - right, CGRectGetMaxY(view.frame) + top, width, height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view matchingLeftWithTopPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMinX(view.frame), CGRectGetMaxY(view.frame) + top, width, height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view matchingLeftAndFillingWidthWithRightPadding:(CGFloat)right topPadding:(CGFloat)top height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMinX(view.frame), CGRectGetMaxY(view.frame) + top, CGRectGetWidth(view.superview.frame) - CGRectGetMinX(view.frame) - right, height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view matchingCenterWithTopPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMidX(view.frame) - (width / 2.0), CGRectGetMaxY(view.frame) + top, width, height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view centeredFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight topPadding:(CGFloat)top height:(CGFloat)height {
|
||||
self.frame = CGRectMake(leftAndRight, CGRectGetMaxY(view.frame) + top, CGRectGetWidth(view.superview.frame) - (2 * leftAndRight), height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view centeredFillingWidthAndHeightWithLeftAndRightPadding:(CGFloat)leftAndRight topAndBottomPadding:(CGFloat)topAndBottom {
|
||||
self.frame = CGRectMake(leftAndRight, CGRectGetMaxY(view.frame) + topAndBottom, CGRectGetWidth(view.superview.frame) - (2 * leftAndRight), CGRectGetHeight(self.superview.frame) - CGRectGetMaxY(view.frame) - topAndBottom - topAndBottom);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view matchingRightWithTopPadding:(CGFloat)top width:(CGFloat)width height:(CGFloat)height {
|
||||
self.frame = CGRectMake(CGRectGetMaxX(view.frame) - width, CGRectGetMaxY(view.frame) + top, width, height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view matchingRightAndFillingWidthWithLeftPadding:(CGFloat)left topPadding:(CGFloat)top height:(CGFloat)height {
|
||||
self.frame = CGRectMake(left, CGRectGetMaxY(view.frame) + top, CGRectGetMinX(view.frame) + CGRectGetWidth(view.frame) - left, height);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view matchingLeftAndRightFillingHeightWithTopPadding:(CGFloat)top bottomPadding:(CGFloat)bottom {
|
||||
self.frame = CGRectMake(CGRectGetMinX(view.frame), CGRectGetMaxY(view.frame) + top, CGRectGetWidth(view.frame), CGRectGetHeight(self.superview.frame) - CGRectGetMaxY(view.frame) - top - bottom);
|
||||
}
|
||||
|
||||
- (void)alignUnder:(UIView *)view matchingLeftFillingWidthAndHeightWithRightPadding:(CGFloat)right topPadding:(CGFloat)top bottomPadding:(CGFloat)bottom {
|
||||
self.frame = CGRectMake(CGRectGetMinX(view.frame), CGRectGetMaxY(view.frame) + top, CGRectGetWidth(self.superview.frame) - CGRectGetMinX(view.frame) - right, CGRectGetHeight(self.superview.frame) - CGRectGetMaxY(view.frame) - top - bottom);
|
||||
}
|
||||
93
samples/ocaml.ml
Normal file
93
samples/ocaml.ml
Normal file
@ -0,0 +1,93 @@
|
||||
open Lexer_flow
|
||||
module Ast = Spider_monkey_ast
|
||||
open Ast
|
||||
module Error = Parse_error
|
||||
module SSet = Set.Make(String)
|
||||
module SMap = Map.Make(String)
|
||||
|
||||
type lex_mode =
|
||||
| NORMAL_LEX
|
||||
| TYPE_LEX
|
||||
| JSX_TAG
|
||||
| JSX_CHILD
|
||||
|
||||
let mode_to_string = function
|
||||
| NORMAL_LEX -> "NORMAL"
|
||||
| TYPE_LEX -> "TYPE"
|
||||
| JSX_TAG -> "JSX TAG"
|
||||
| JSX_CHILD -> "JSX CHILD"
|
||||
|
||||
let lex lex_env = function
|
||||
| NORMAL_LEX -> token lex_env
|
||||
| TYPE_LEX -> type_token lex_env
|
||||
| JSX_TAG -> lex_jsx_tag lex_env
|
||||
| JSX_CHILD -> lex_jsx_child lex_env
|
||||
|
||||
type env = {
|
||||
errors : (Loc.t * Error.t) list ref;
|
||||
comments : Comment.t list ref;
|
||||
labels : SSet.t;
|
||||
lb : Lexing.lexbuf;
|
||||
lookahead : lex_result ref;
|
||||
last : (lex_env * lex_result) option ref;
|
||||
priority : int;
|
||||
strict : bool;
|
||||
in_export : bool;
|
||||
in_loop : bool;
|
||||
in_switch : bool;
|
||||
in_function : bool;
|
||||
no_in : bool;
|
||||
no_call : bool;
|
||||
no_let : bool;
|
||||
allow_yield : bool;
|
||||
(* Use this to indicate that the "()" as in "() => 123" is not allowed in
|
||||
* this expression *)
|
||||
error_callback : (env -> Error.t -> unit) option;
|
||||
lex_mode_stack : lex_mode list ref;
|
||||
lex_env : lex_env ref;
|
||||
}
|
||||
|
||||
(* constructor *)
|
||||
let init_env lb =
|
||||
let lex_env = new_lex_env lb in
|
||||
let lex_env, lookahead = lex lex_env NORMAL_LEX in
|
||||
{
|
||||
errors = ref [];
|
||||
comments = ref [];
|
||||
labels = SSet.empty;
|
||||
lb = lb;
|
||||
lookahead = ref lookahead;
|
||||
last = ref None;
|
||||
priority = 0;
|
||||
strict = false;
|
||||
in_export = false;
|
||||
in_loop = false;
|
||||
in_switch = false;
|
||||
in_function = false;
|
||||
no_in = false;
|
||||
no_call = false;
|
||||
no_let = false;
|
||||
allow_yield = true;
|
||||
error_callback = None;
|
||||
lex_mode_stack = ref [NORMAL_LEX];
|
||||
lex_env = ref lex_env;
|
||||
}
|
||||
|
||||
(* getters: *)
|
||||
let strict env = env.strict
|
||||
let lookahead env = !(env.lookahead)
|
||||
let lb env = env.lb
|
||||
let lex_mode env = List.hd !(env.lex_mode_stack)
|
||||
let lex_env env = !(env.lex_env)
|
||||
let last env = !(env.last)
|
||||
let in_export env = env.in_export
|
||||
let comments env = !(env.comments)
|
||||
let labels env = env.labels
|
||||
let in_loop env = env.in_loop
|
||||
let in_switch env = env.in_switch
|
||||
let in_function env = env.in_function
|
||||
let allow_yield env = env.allow_yield
|
||||
let no_in env = env.no_in
|
||||
let no_call env = env.no_call
|
||||
let no_let env = env.no_let
|
||||
let errors env = !(env.errors)
|
||||
45
samples/perl.pl
Normal file
45
samples/perl.pl
Normal file
@ -0,0 +1,45 @@
|
||||
use strict;
|
||||
|
||||
#
|
||||
# This script also prints the contents of all the listed files, but
|
||||
# it first scans through the list to check that each file exists and
|
||||
# is readable. It will stop if there are any errors.
|
||||
#
|
||||
|
||||
my $bad = 0;
|
||||
foreach my $fn (@ARGV) {
|
||||
if(! -r $fn) {
|
||||
# File cannot be read. See if it exists or not for a better
|
||||
# error message.
|
||||
if(-e $fn) {
|
||||
print STDERR "You do not have permission to read $fn.\n";
|
||||
} else {
|
||||
print STDERR "File $fn does not exist.\n";
|
||||
}
|
||||
|
||||
# One way or the other, it's bad.
|
||||
$bad = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# If there was a problem, bail out.
|
||||
if($bad) { exit 2; }
|
||||
|
||||
# Copy all the files.
|
||||
while(my $fn = shift @ARGV) {
|
||||
|
||||
# Open the file.
|
||||
if(!open(INFILE, $fn)) {
|
||||
# We know the file is readable, but sometimes something else goes
|
||||
# wrong. It's safer to check.
|
||||
print STDERR "Cannot open $fn: $!\n";
|
||||
next;
|
||||
}
|
||||
|
||||
# Copy it.
|
||||
while(my $l = <INFILE>) {
|
||||
print $l;
|
||||
}
|
||||
|
||||
close INFILE;
|
||||
}
|
||||
69
samples/python.py
Normal file
69
samples/python.py
Normal file
@ -0,0 +1,69 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import sublime
|
||||
import sublime_plugin
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class SublimeTasksBase(sublime_plugin.TextCommand):
|
||||
def run(self, edit):
|
||||
self.open_tasks_bullet = self.view.settings().get('open_tasks_bullet')
|
||||
self.done_tasks_bullet = self.view.settings().get('done_tasks_bullet')
|
||||
self.date_format = self.view.settings().get('date_format')
|
||||
if self.view.settings().get('done_tag'):
|
||||
self.done_tag = "@done"
|
||||
else:
|
||||
self.done_tag = ""
|
||||
self.runCommand(edit)
|
||||
|
||||
|
||||
class NewCommand(SublimeTasksBase):
|
||||
def runCommand(self, edit):
|
||||
for region in self.view.sel():
|
||||
line = self.view.line(region)
|
||||
line_contents = self.view.substr(line).rstrip()
|
||||
has_bullet = re.match('^(\s*)[' + re.escape(self.open_tasks_bullet) + re.escape(self.done_tasks_bullet) + ']', self.view.substr(line))
|
||||
current_scope = self.view.scope_name(self.view.sel()[0].b)
|
||||
if has_bullet:
|
||||
grps = has_bullet.groups()
|
||||
line_contents = self.view.substr(line) + '\n' + grps[0] + self.open_tasks_bullet + ' '
|
||||
self.view.replace(edit, line, line_contents)
|
||||
elif 'header' in current_scope:
|
||||
header = re.match('^(\s*)\S+', self.view.substr(line))
|
||||
if header:
|
||||
grps = header.groups()
|
||||
line_contents = self.view.substr(line) + '\n' + grps[0] + ' ' + self.open_tasks_bullet + ' '
|
||||
else:
|
||||
line_contents = ' ' + self.open_tasks_bullet + ' '
|
||||
self.view.replace(edit, line, line_contents)
|
||||
end = self.view.sel()[0].b
|
||||
pt = sublime.Region(end, end)
|
||||
self.view.sel().clear()
|
||||
self.view.sel().add(pt)
|
||||
else:
|
||||
has_space = re.match('^(\s+)(.*)', self.view.substr(line))
|
||||
if has_space:
|
||||
grps = has_space.groups()
|
||||
spaces = grps[0]
|
||||
line_contents = spaces + self.open_tasks_bullet + ' ' + grps[1]
|
||||
self.view.replace(edit, line, line_contents)
|
||||
else:
|
||||
line_contents = ' ' + self.open_tasks_bullet + ' ' + self.view.substr(line)
|
||||
self.view.replace(edit, line, line_contents)
|
||||
end = self.view.sel()[0].b
|
||||
pt = sublime.Region(end, end)
|
||||
self.view.sel().clear()
|
||||
self.view.sel().add(pt)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
121
samples/r.r
Normal file
121
samples/r.r
Normal file
@ -0,0 +1,121 @@
|
||||
geom_dotplot <- function (mapping = NULL, data = NULL, stat = "bindot", position = "identity",
|
||||
na.rm = FALSE, binwidth = NULL, binaxis = "x", method="dotdensity", binpositions = "bygroup", stackdir = "up",
|
||||
stackratio = 1, dotsize = 1, stackgroups = FALSE, ...) {
|
||||
GeomDotplot$new(mapping = mapping, data = data, stat = stat, position = position,
|
||||
na.rm = na.rm, binwidth = binwidth, binaxis = binaxis, method = method, binpositions = binpositions,
|
||||
stackdir = stackdir, stackratio = stackratio, dotsize = dotsize, stackgroups = stackgroups, ...)
|
||||
}
|
||||
|
||||
GeomDotplot <- proto(Geom, {
|
||||
objname <- "dotplot"
|
||||
|
||||
new <- function(., mapping = NULL, data = NULL, stat = NULL, position = NULL, ...){
|
||||
# This code is adapted from Layer$new. It's needed to pull out the stat_params
|
||||
# and geom_params, then manually add binaxis to both sets of params. Otherwise
|
||||
# Layer$new will give binaxis only to the geom.
|
||||
|
||||
stat <- Stat$find(stat)
|
||||
match.params <- function(possible, params) {
|
||||
if ("..." %in% names(possible)) {
|
||||
params
|
||||
} else {
|
||||
params[match(names(possible), names(params), nomatch = 0)]
|
||||
}
|
||||
}
|
||||
|
||||
params <- list(...)
|
||||
# American names must be changed here so that they'll go to geom_params;
|
||||
# otherwise they'll end up in stat_params
|
||||
params <- rename_aes(params)
|
||||
|
||||
geom_params <- match.params(.$parameters(), params)
|
||||
stat_params <- match.params(stat$parameters(), params)
|
||||
stat_params <- stat_params[setdiff(names(stat_params), names(geom_params))]
|
||||
# Add back binaxis
|
||||
stat_params <- c(stat_params, binaxis=params$binaxis)
|
||||
|
||||
# If identical(position, "stack") or position is position_stack() (the test
|
||||
# is kind of complex), tell them to use stackgroups=TRUE instead. Need to
|
||||
# use identical() instead of ==, because == will fail if object is
|
||||
# position_stack() or position_dodge()
|
||||
if (!is.null(position) && (identical(position, "stack") || (is.proto(position) && position$objname == "stack")))
|
||||
message("position=\"stack\" doesn't work properly with geom_dotplot. Use stackgroups=TRUE instead.")
|
||||
|
||||
if (params$stackgroups && params$method == "dotdensity" && params$binpositions == "bygroup")
|
||||
message('geom_dotplot called with stackgroups=TRUE and method="dotdensity". You probably want to set binpositions="all"')
|
||||
|
||||
do.call("layer", list(mapping = mapping, data = data, stat = stat, geom = ., position = position,
|
||||
geom_params = geom_params, stat_params = stat_params, ...))
|
||||
}
|
||||
|
||||
|
||||
reparameterise <- function(., df, params) {
|
||||
df$width <- df$width %||%
|
||||
params$width %||% (resolution(df$x, FALSE) * 0.9)
|
||||
|
||||
# Set up the stacking function and range
|
||||
if(is.null(params$stackdir) || params$stackdir == "up") {
|
||||
stackdots <- function(a) a - .5
|
||||
stackaxismin <- 0
|
||||
stackaxismax <- 1
|
||||
} else if (params$stackdir == "down") {
|
||||
stackdots <- function(a) -a + .5
|
||||
stackaxismin <- -1
|
||||
stackaxismax <- 0
|
||||
} else if (params$stackdir == "center") {
|
||||
stackdots <- function(a) a - 1 - max(a - 1) / 2
|
||||
stackaxismin <- -.5
|
||||
stackaxismax <- .5
|
||||
} else if (params$stackdir == "centerwhole") {
|
||||
stackdots <- function(a) a - 1 - floor(max(a - 1) / 2)
|
||||
stackaxismin <- -.5
|
||||
stackaxismax <- .5
|
||||
}
|
||||
|
||||
|
||||
# Fill the bins: at a given x (or y), if count=3, make 3 entries at that x
|
||||
df <- df[rep(1:nrow(df), df$count), ]
|
||||
|
||||
# Next part will set the position of each dot within each stack
|
||||
# If stackgroups=TRUE, split only on x (or y) and panel; if not stacking, also split by group
|
||||
plyvars <- params$binaxis %||% "x"
|
||||
plyvars <- c(plyvars, "PANEL")
|
||||
if (is.null(params$stackgroups) || !params$stackgroups)
|
||||
plyvars <- c(plyvars, "group")
|
||||
|
||||
# Within each x, or x+group, set countidx=1,2,3, and set stackpos according to stack function
|
||||
df <- ddply(df, plyvars, function(xx) {
|
||||
xx$countidx <- 1:nrow(xx)
|
||||
xx$stackpos <- stackdots(xx$countidx)
|
||||
xx
|
||||
})
|
||||
|
||||
|
||||
# Set the bounding boxes for the dots
|
||||
if (is.null(params$binaxis) || params$binaxis == "x") {
|
||||
# ymin, ymax, xmin, and xmax define the bounding rectangle for each stack
|
||||
# Can't do bounding box per dot, because y position isn't real.
|
||||
# After position code is rewritten, each dot should have its own bounding box.
|
||||
df$xmin <- df$x - df$binwidth / 2
|
||||
df$xmax <- df$x + df$binwidth / 2
|
||||
df$ymin <- stackaxismin
|
||||
df$ymax <- stackaxismax
|
||||
df$y <- 0
|
||||
|
||||
} else if (params$binaxis == "y") {
|
||||
# ymin, ymax, xmin, and xmax define the bounding rectangle for each stack
|
||||
# Can't do bounding box per dot, because x position isn't real.
|
||||
# xmin and xmax aren't really the x bounds, because of the odd way the grob
|
||||
# works. They're just set to the standard x +- width/2 so that dot clusters
|
||||
# can be dodged like other geoms.
|
||||
# After position code is rewritten, each dot should have its own bounding box.
|
||||
df <- ddply(df, .(group), transform,
|
||||
ymin = min(y) - binwidth[1] / 2,
|
||||
ymax = max(y) + binwidth[1] / 2)
|
||||
|
||||
df$xmin <- df$x + df$width * stackaxismin
|
||||
df$xmax <- df$x + df$width * stackaxismax
|
||||
# Unlike with y above, don't change x because it will cause problems with dodging
|
||||
}
|
||||
df
|
||||
}
|
||||
69
samples/ruby.rb
Normal file
69
samples/ruby.rb
Normal file
@ -0,0 +1,69 @@
|
||||
class HTMLProcessor
|
||||
|
||||
# called before parsing anything
|
||||
def start_parsing(scope_name)
|
||||
@line = ""
|
||||
@offset = 0
|
||||
@text= []
|
||||
end
|
||||
|
||||
# called after parsing everything
|
||||
def end_parsing(scope_name)
|
||||
@text.each_with_index do |line, index|
|
||||
@text[index] = "<span class='l l-#{index+1} #{scope_name.gsub('.',' ')}'>#{line}</span>"
|
||||
end
|
||||
puts @text.join("")
|
||||
end
|
||||
|
||||
# called before processing a line
|
||||
def new_line(line_content)
|
||||
@offset = 0
|
||||
@line = line_content.clone
|
||||
@text << @line
|
||||
end
|
||||
|
||||
def open_tag(tag_name, position_in_current_line)
|
||||
tag = "<s class='#{tag_name.gsub("."," ")}'>"
|
||||
@line.insert(position_in_current_line + @offset, tag)
|
||||
@offset += tag.size
|
||||
end
|
||||
|
||||
def close_tag(tag_name, position_in_current_line)
|
||||
tag = "</s>"
|
||||
@line.insert(position_in_current_line + @offset, tag)
|
||||
@offset += tag.size
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
syntax = Textpow.syntax('ruby') # or 'source.ruby' or 'lib/textpow/syntax/source.ruby.syntax'
|
||||
processor = HTMLProcessor.new
|
||||
syntax.parse(text, processor)
|
||||
|
||||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require 'rails/all'
|
||||
|
||||
if defined?(Bundler)
|
||||
# If you precompile assets before deploying to production, use this line
|
||||
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
||||
# If you want your assets lazily compiled in production, use this line
|
||||
# Bundler.require(:default, :assets, Rails.env)
|
||||
end
|
||||
|
||||
require 'rubygems'
|
||||
|
||||
# Set up gems listed in the Gemfile.
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
|
||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,697 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!-- Generated by: TmTheme-Editor -->
|
||||
<!-- ============================================ -->
|
||||
<!-- app: http://tmtheme-editor.herokuapp.com -->
|
||||
<!-- code: https://github.com/aziz/tmTheme-Editor -->
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>OneHalfLight</string>
|
||||
<key>semanticClass</key>
|
||||
<string>theme.light.one_half_light</string>
|
||||
<key>uuid</key>
|
||||
<string></string>
|
||||
<key>colorSpaceName</key>
|
||||
<string>sRGB</string>
|
||||
<key>author</key>
|
||||
<string>Son A. Pham <sp@sonpham.me></string>
|
||||
<key>comment</key>
|
||||
<string>A light iTerm color scheme based on Atom's One. See github.com/sonph/onehalf for installation instructions, a dark color scheme, and versions for other editors/terminals such as (Neo)Vim and Sublime Text.</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
<key>background</key>
|
||||
<string>#fafafa</string>
|
||||
<key>bracketsOptions</key>
|
||||
<string>underline</string>
|
||||
<key>caret</key>
|
||||
<string>#383a42</string>
|
||||
<key>gutter</key>
|
||||
<string>#fafafa</string>
|
||||
<key>gutterForeground</key>
|
||||
<string>#d4d4d4</string>
|
||||
<key>invisibles</key>
|
||||
<string>#a0a1a7</string>
|
||||
<key>lineHighlight</key>
|
||||
<string>#f0f0f0</string>
|
||||
<key>selection</key>
|
||||
<string>#bfceff</string>
|
||||
<key>selectionBorder</key>
|
||||
<string>#bfceff</string>
|
||||
<key>tagsForeground</key>
|
||||
<string></string>
|
||||
<key>tagsOptions</key>
|
||||
<string>stippled_underline</string>
|
||||
<key>bracketContentsOptions</key>
|
||||
<string>underline</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comments</string>
|
||||
<key>scope</key>
|
||||
<string>comment</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a0a1a7</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Text</string>
|
||||
<key>scope</key>
|
||||
<string>variable.parameter.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Delimiters</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Operators</string>
|
||||
<key>scope</key>
|
||||
<string>keyword.operator</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Keywords</string>
|
||||
<key>scope</key>
|
||||
<string>keyword</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a626a4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Variables</string>
|
||||
<key>scope</key>
|
||||
<string>variable</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e45649</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Functions</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.function, meta.require, support.function.any-method</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Classes</string>
|
||||
<key>scope</key>
|
||||
<string>support.class, entity.name.class, entity.name.type.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Classes</string>
|
||||
<key>scope</key>
|
||||
<string>meta.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Methods</string>
|
||||
<key>scope</key>
|
||||
<string>keyword.other.special-method</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Storage</string>
|
||||
<key>scope</key>
|
||||
<string>storage</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a626a4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Support</string>
|
||||
<key>scope</key>
|
||||
<string>support.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Strings, Inherited Class</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#50a14f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Integers</string>
|
||||
<key>scope</key>
|
||||
<string>constant.numeric</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Floats</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Boolean</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Constants</string>
|
||||
<key>scope</key>
|
||||
<string>constant</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>HTML: Tags</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.tag</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e45649</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>HTML: Tag attributes</string>
|
||||
<key>scope</key>
|
||||
<string>entity.other.attribute-name</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Attribute IDs</string>
|
||||
<key>scope</key>
|
||||
<string>entity.other.attribute-name.id, punctuation.definition.entity</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#c18401</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Selector</string>
|
||||
<key>scope</key>
|
||||
<string>meta.selector</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a626a4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Headings</string>
|
||||
<key>scope</key>
|
||||
<string>markup.heading punctuation.definition.heading, entity.name.section</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Bold</string>
|
||||
<key>scope</key>
|
||||
<string>markup.bold, punctuation.definition.bold</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a626a4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Italic</string>
|
||||
<key>scope</key>
|
||||
<string>markup.italic, punctuation.definition.italic</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a626a4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Code</string>
|
||||
<key>scope</key>
|
||||
<string>markup.raw.inline</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#50a14f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Link Text</string>
|
||||
<key>scope</key>
|
||||
<string>string.other.link, punctuation.definition.string.end.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Link Url</string>
|
||||
<key>scope</key>
|
||||
<string>meta.link</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#50a14f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Lists</string>
|
||||
<key>scope</key>
|
||||
<string>markup.list</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown: Quotes</string>
|
||||
<key>scope</key>
|
||||
<string>markup.quote</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#50a14f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Java Source</string>
|
||||
<key>scope</key>
|
||||
<string>source.java meta.class.java meta.method.java</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Java Class Body</string>
|
||||
<key>scope</key>
|
||||
<string>source.java meta.class.java meta.class.body.java</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Function Arguments</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.function.js variable.parameter.function.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e45649</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: New Variables</string>
|
||||
<key>scope</key>
|
||||
<string>source.js variable.other.readwrite.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e45649</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Variables</string>
|
||||
<key>scope</key>
|
||||
<string>source.js variable.other.object.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Variables in Function Calls</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.function-call.method.js variable.other.readwrite.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e45649</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: New Block Variables</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.block.js variable.other.readwrite.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e45649</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Block Variables</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.block.js variable.other.object.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Block Variables in Function Calls</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.block.js meta.function-call.method.js variable.other.readwrite.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Function Calls</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.function-call.method.js variable.function.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Properties</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.property.object.js entity.name.function.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Javascript: Prototypes</string>
|
||||
<key>scope</key>
|
||||
<string>source.js support.constant.prototype.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#383a42</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Separator</string>
|
||||
<key>scope</key>
|
||||
<string>meta.separator</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Inserted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.inserted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#98c379</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Deleted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.deleted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e06c75</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Changed</string>
|
||||
<key>scope</key>
|
||||
<string>markup.changed</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e5c07b</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Regular Expressions</string>
|
||||
<key>scope</key>
|
||||
<string>string.regexp</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#50a14f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Escape Characters</string>
|
||||
<key>scope</key>
|
||||
<string>constant.character.escape</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0997b3</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Embedded</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.section.embedded, variable.interpolation</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Illegal</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.illegal</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#e06c75</string>
|
||||
<key>foreground</key>
|
||||
<string>#fafafa</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Broken</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.broken</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#e5c07b</string>
|
||||
<key>foreground</key>
|
||||
<string>#fafafa</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Deprecated</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.deprecated</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#e5c07b</string>
|
||||
<key>foreground</key>
|
||||
<string>#fafafa</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Unimplemented</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.unimplemented</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#c678dd</string>
|
||||
<key>foreground</key>
|
||||
<string>#fafafa</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Italic</string>
|
||||
<key>scope</key>
|
||||
<string>
|
||||
markup.italic,
|
||||
punctuation.definition.italic,
|
||||
comment,
|
||||
punctuation.definition.comment,
|
||||
string.comment,
|
||||
comment.block.documentation,
|
||||
comment.block.documentation variable,
|
||||
comment.block.documentation punctuation.definition,
|
||||
keyword.other.documentation,
|
||||
storage.type.class.jsdoc,
|
||||
comment.block,
|
||||
comment.block variable.parameter,
|
||||
keyword.other.phpdoc,
|
||||
comment.block.documentation entity.name.type,
|
||||
keyword,
|
||||
keyword.operator.expression,
|
||||
keyword.operator.new,
|
||||
variable.language,
|
||||
markup.quote,
|
||||
markup.inserted,
|
||||
markup.deleted,
|
||||
markup.changed,
|
||||
storage,
|
||||
constant.language,
|
||||
entity.name.class,
|
||||
entity.other.attribute-name
|
||||
</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>No Italic</string>
|
||||
<key>scope</key>
|
||||
<string>
|
||||
keyword.operator,
|
||||
keyword.other.unit,
|
||||
support.type.property-name,
|
||||
keyword.other.special-method,
|
||||
entity.name.tag
|
||||
</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>normal</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,205 +0,0 @@
|
||||
{
|
||||
"name": "One Half Light Italic",
|
||||
"tokenColors": "./one-half-light-italic.tmTheme",
|
||||
"colors": {
|
||||
"activityBar.background": "#f1f1f1",
|
||||
"activityBar.dropBackground": "#e8e8e8",
|
||||
"activityBar.foreground": "#383a42",
|
||||
"activityBarBadge.background": "#0099e1",
|
||||
"activityBarBadge.foreground": "#ffffff",
|
||||
"badge.background": "#0099e1",
|
||||
"badge.foreground": "#ffffff",
|
||||
"breadcrumb.activeSelectionForeground": "#009ae5",
|
||||
"breadcrumb.focusForeground": "#383a42",
|
||||
"breadcrumb.foreground": "#a0a1a7",
|
||||
"button.background": "#0083c0",
|
||||
"button.foreground": "#ffffff",
|
||||
"button.hoverBackground": "#0099e1",
|
||||
"debugExceptionWidget.background": "#ffcccc",
|
||||
"debugExceptionWidget.border": "#ff2e3f",
|
||||
"debugToolBar.background": "#eeeeee",
|
||||
"diffEditor.insertedTextBackground": "#1ef1531f",
|
||||
"diffEditor.removedTextBackground": "#f33b5127",
|
||||
"dropdown.background": "#e8e8e8",
|
||||
"dropdown.border": "#d5d7d8",
|
||||
"dropdown.foreground": "#383a42",
|
||||
"dropdown.listBackground": "#e8e8e8",
|
||||
"editor.background": "#f7f7f7",
|
||||
"editor.findMatchBackground": "#99e5c2c5",
|
||||
"editor.findMatchBorder": "#f31459",
|
||||
"editor.findMatchHighlightBackground": "#99e5c2c5",
|
||||
"editor.findRangeHighlightBackground": "#a0a1a72d",
|
||||
"editor.foreground": "#383a42",
|
||||
"editor.hoverHighlightBackground": "#e8e8e8",
|
||||
"editor.lineHighlightBackground": "#f1f1f1",
|
||||
"editor.rangeHighlightBackground": "#a0a1a70e",
|
||||
"editor.selectionBackground": "#d2ecff",
|
||||
"editor.selectionHighlightBackground": "#e8e8e8",
|
||||
"editor.snippetFinalTabstopHighlightBackground": "#a0a1a733",
|
||||
"editor.snippetFinalTabstopHighlightBorder": "#a0a1a7",
|
||||
"editor.snippetTabstopHighlightBackground": "#a0a1a733",
|
||||
"editor.snippetTabstopHighlightBorder": "#a0a1a7",
|
||||
"editor.wordHighlightBackground": "#d9e6fd",
|
||||
"editor.wordHighlightStrongBackground": "#ecd1e5",
|
||||
"editorBracketMatch.background": "#00000000",
|
||||
"editorBracketMatch.border": "#7a82da",
|
||||
"editorCodeLens.foreground": "#a0a1a7",
|
||||
"editorCursor.background": "#f9f9f9",
|
||||
"editorCursor.foreground": "#f31459",
|
||||
"editorGroup.border": "#d5d7d8",
|
||||
"editorGroup.dropBackground": "#009ae128",
|
||||
"editorGroup.emptyBackground": "#e8e8e8",
|
||||
"editorGroup.focusedEmptyBorder": "#0099e1",
|
||||
"editorGroupHeader.noTabsBackground": "#e8e8e8",
|
||||
"editorGroupHeader.tabsBackground": "#e8e8e8",
|
||||
"editorGutter.addedBackground": "#3cbc66",
|
||||
"editorGutter.deletedBackground": "#ff6480",
|
||||
"editorGutter.modifiedBackground": "#0099e1",
|
||||
"editorHint.foreground": "#a0a1a7",
|
||||
"editorIndentGuide.activeBackground": "#939393",
|
||||
"editorInfo.foreground": "#0099e1",
|
||||
"editorLineNumber.activeForeground": "#f31459",
|
||||
"editorLineNumber.foreground": "#a0a1a7",
|
||||
"editorLink.activeForeground": "#0099e1",
|
||||
"editorMarkerNavigation.background": "#f9f9f9",
|
||||
"editorOverviewRuler.addedForeground": "#3cbc66",
|
||||
"editorOverviewRuler.bracketMatchForeground": "#7a82da",
|
||||
"editorOverviewRuler.deletedForeground": "#ff6480",
|
||||
"editorOverviewRuler.errorForeground": "#ff0000",
|
||||
"editorOverviewRuler.findMatchForeground": "#99e5c2c5",
|
||||
"editorOverviewRuler.infoForeground": "#0099e1",
|
||||
"editorOverviewRuler.modifiedForeground": "#0099e1",
|
||||
"editorOverviewRuler.selectionHighlightForeground": "#d2ecff",
|
||||
"editorOverviewRuler.warningForeground": "#df631c",
|
||||
"editorOverviewRuler.wordHighlightForeground": "#d9e6fd",
|
||||
"editorPane.background": "#eeeeee",
|
||||
"editorRuler.foreground": "#d5d7d8",
|
||||
"editorWarning.foreground": "#df631c",
|
||||
"editorWhitespace.foreground": "#d5d7d8",
|
||||
"editorWidget.background": "#e8e8e8",
|
||||
"editorWidget.border": "#d5d7d8",
|
||||
"errorForeground": "#ff0000",
|
||||
"extensionButton.prominentBackground": "#1f8642",
|
||||
"extensionButton.prominentForeground": "#ffffff",
|
||||
"extensionButton.prominentHoverBackground": "#23974a",
|
||||
"focusBorder": "#0099e1",
|
||||
"foreground": "#383a42",
|
||||
"gitDecoration.conflictingResourceForeground": "#d52753",
|
||||
"gitDecoration.deletedResourceForeground": "#a05a48",
|
||||
"gitDecoration.ignoredResourceForeground": "#a0a1a7",
|
||||
"gitDecoration.modifiedResourceForeground": "#0099e1",
|
||||
"gitDecoration.untrackedResourceForeground": "#23974a",
|
||||
"gitlens.gutterBackgroundColor": "#ffffff55",
|
||||
"gitlens.gutterForegroundColor": "#383a42",
|
||||
"gitlens.gutterUncommittedForegroundColor": "#0099e1",
|
||||
"gitlens.lineHighlightBackgroundColor": "#d2ecff",
|
||||
"gitlens.lineHighlightOverviewRulerColor": "#d2ecff",
|
||||
"gitlens.trailingLineBackgroundColor": "#d2ecff",
|
||||
"gitlens.trailingLineForegroundColor": "#a0a1a7",
|
||||
"input.background": "#f9f9f9",
|
||||
"input.border": "#d5d7d8",
|
||||
"input.foreground": "#383a42",
|
||||
"input.placeholderForeground": "#a0a1a7",
|
||||
"inputOption.activeBorder": "#0099e1",
|
||||
"inputValidation.errorBackground": "#ffcccc",
|
||||
"inputValidation.errorBorder": "#ff2e3f",
|
||||
"inputValidation.infoBackground": "#d2ecff",
|
||||
"inputValidation.infoBorder": "#0099e1",
|
||||
"inputValidation.warningBackground": "#debaa6",
|
||||
"inputValidation.warningBorder": "#df631c",
|
||||
"list.activeSelectionBackground": "#00a7f5",
|
||||
"list.activeSelectionForeground": "#ffffff",
|
||||
"list.dropBackground": "#d2ecff",
|
||||
"list.focusBackground": "#d2ecff",
|
||||
"list.focusForeground": "#000000",
|
||||
"list.highlightForeground": "#0098dd",
|
||||
"list.hoverBackground": "#f1f1f1",
|
||||
"list.inactiveSelectionBackground": "#f6f6f6",
|
||||
"list.warningForeground": "#df631c",
|
||||
"merge.currentContentBackground": "#a05a481c",
|
||||
"merge.currentHeaderBackground": "#a05a483b",
|
||||
"merge.incomingContentBackground": "#009ae121",
|
||||
"merge.incomingHeaderBackground": "#009ae13b",
|
||||
"notificationCenter.border": "#d5d7d8",
|
||||
"notificationCenterHeader.background": "#d5d7d8",
|
||||
"notificationCenterHeader.foreground": "#383a42",
|
||||
"notificationLink.foreground": "#0099e1",
|
||||
"notificationToast.border": "#d5d7d8",
|
||||
"notifications.background": "#e8e8e8",
|
||||
"notifications.border": "#d5d7d8",
|
||||
"notifications.foreground": "#383a42",
|
||||
"panel.border": "#d5d7d8",
|
||||
"panel.dropBackground": "#e8e8e8",
|
||||
"panelTitle.activeBorder": "#0099e1",
|
||||
"panelTitle.activeForeground": "#383a42",
|
||||
"panelTitle.inactiveForeground": "#383a42aa",
|
||||
"peekView.border": "#0099e1",
|
||||
"peekViewEditor.background": "#f9f9f9",
|
||||
"peekViewEditor.matchHighlightBackground": "#99e5c1",
|
||||
"peekViewResult.background": "#e8e8e8",
|
||||
"peekViewResult.fileForeground": "#383a42",
|
||||
"peekViewResult.lineForeground": "#383a42",
|
||||
"peekViewResult.matchHighlightBackground": "#99e5c1",
|
||||
"peekViewResult.selectionBackground": "#0099e1",
|
||||
"peekViewResult.selectionForeground": "#ffffff",
|
||||
"peekViewTitle.background": "#e8e8e8",
|
||||
"peekViewTitleDescription.foreground": "#a0a1a7",
|
||||
"peekViewTitleLabel.foreground": "#383a42",
|
||||
"pickerGroup.border": "#d5d7d8",
|
||||
"pickerGroup.foreground": "#0099e1",
|
||||
"progressBar.background": "#0099e1",
|
||||
"scrollbarSlider.activeBackground": "#bebebe99",
|
||||
"scrollbarSlider.background": "#dedede99",
|
||||
"scrollbarSlider.hoverBackground": "#cecece99",
|
||||
"selection.background": "#d2ecff",
|
||||
"sideBar.background": "#E8E8E8",
|
||||
"sideBar.border": "#d1d1d1",
|
||||
"sideBar.dropBackground": "#e8e8e8",
|
||||
"sideBar.foreground": "#383a42",
|
||||
"sideBarSectionHeader.background": "#d5d7d8",
|
||||
"sideBarSectionHeader.foreground": "#383a42",
|
||||
"sideBarTitle.foreground": "#383a42",
|
||||
"statusBar.background": "#0099e1",
|
||||
"statusBar.debuggingBackground": "#df631c",
|
||||
"statusBar.foreground": "#ffffff",
|
||||
"statusBar.noFolderBackground": "#823ff1",
|
||||
"tab.activeBorderTop": "#0099e1",
|
||||
"tab.activeForeground": "#383a42",
|
||||
"tab.hoverBackground": "#f1f1f1",
|
||||
"tab.inactiveBackground": "#eeeeee",
|
||||
"tab.inactiveForeground": "#a0a1a7",
|
||||
"tab.unfocusedActiveBorderTop": "#a0a1a7",
|
||||
"terminal.ansiBlack": "#d5d6dd",
|
||||
"terminal.ansiBlue": "#275fe4",
|
||||
"terminal.ansiBrightBlack": "#e4e5ed",
|
||||
"terminal.ansiBrightBlue": "#0099e1",
|
||||
"terminal.ansiBrightCyan": "#6d93bb",
|
||||
"terminal.ansiBrightGreen": "#3cbc66",
|
||||
"terminal.ansiBrightMagenta": "#ce33c0",
|
||||
"terminal.ansiBrightRed": "#ff6480",
|
||||
"terminal.ansiBrightWhite": "#26272d",
|
||||
"terminal.ansiBrightYellow": "#c5a332",
|
||||
"terminal.ansiCyan": "#27618d",
|
||||
"terminal.ansiGreen": "#23974a",
|
||||
"terminal.ansiMagenta": "#823ff1",
|
||||
"terminal.ansiRed": "#d52753",
|
||||
"terminal.ansiWhite": "#000000",
|
||||
"terminal.ansiYellow": "#df631c",
|
||||
"terminalCursor.foreground": "#f31459",
|
||||
"textBlockQuote.background": "#d5d7d8",
|
||||
"textBlockQuote.border": "#0099e1",
|
||||
"textCodeBlock.background": "#d5d7d8",
|
||||
"textLink.activeForeground": "#0099e1",
|
||||
"textLink.foreground": "#0099e1",
|
||||
"textPreformat.foreground": "#a05a48",
|
||||
"textSeparator.foreground": "#d5d7d8",
|
||||
"titleBar.activeBackground": "#c2c4c7",
|
||||
"titleBar.activeForeground": "#383a42",
|
||||
"titleBar.inactiveBackground": "#c2c4c799",
|
||||
"titleBar.inactiveForeground": "#383a4299",
|
||||
"walkThrough.embeddedEditorBackground": "#e8e8e8",
|
||||
"welcomePage.buttonBackground": "#e8e8e8",
|
||||
"welcomePage.buttonHoverBackground": "#d2ecff",
|
||||
"widget.shadow": "#a0a1a7"
|
||||
}
|
||||
}
|
||||
181
themes/one-light-italic.json
Normal file
181
themes/one-light-italic.json
Normal file
@ -0,0 +1,181 @@
|
||||
{
|
||||
"name": "One Half Light Italic",
|
||||
"type": "light",
|
||||
"colors": {
|
||||
"focusBorder": "#0366d6",
|
||||
"foreground": "#24292e",
|
||||
"descriptionForeground": "#6a737d",
|
||||
"errorForeground": "#cb2431",
|
||||
"textLink.foreground": "#0366d6",
|
||||
"textLink.activeForeground": "#0366d6",
|
||||
"textBlockQuote.background": "#f6f8fa",
|
||||
"textBlockQuote.border": "#dfe2e5",
|
||||
"textCodeBlock.background": "#1b1f230d",
|
||||
"textPreformat.foreground": "#586069",
|
||||
"textSeparator.foreground": "#eaecef",
|
||||
"button.background": "#2ea44f",
|
||||
"button.foreground": "#fafafa",
|
||||
"button.hoverBackground": "#2c974b",
|
||||
"button.secondaryBackground": "#eaecef",
|
||||
"button.secondaryForeground": "#24292e",
|
||||
"button.secondaryHoverBackground": "#f3f4f6",
|
||||
"checkbox.background": "#f6f8fa",
|
||||
"checkbox.border": "#e1e4e8",
|
||||
"dropdown.background": "#fafafa",
|
||||
"dropdown.border": "#e1e4e8",
|
||||
"dropdown.foreground": "#24292e",
|
||||
"dropdown.listBackground": "#fafafa",
|
||||
"input.background": "#fafafa",
|
||||
"input.border": "#e1e4e8",
|
||||
"input.foreground": "#24292e",
|
||||
"input.placeholderForeground": "#6a737d",
|
||||
"badge.foreground": "#005cc5",
|
||||
"badge.background": "#dbedff",
|
||||
"progressBar.background": "#2188ff",
|
||||
"titleBar.activeForeground": "#586069",
|
||||
"titleBar.activeBackground": "#fafafa",
|
||||
"titleBar.inactiveForeground": "#6a737d",
|
||||
"titleBar.inactiveBackground": "#f6f8fa",
|
||||
"titleBar.border": "#e1e4e8",
|
||||
"activityBar.foreground": "#24292e",
|
||||
"activityBar.inactiveForeground": "#6a737d",
|
||||
"activityBar.background": "#fafafa",
|
||||
"activityBarBadge.foreground": "#fafafa",
|
||||
"activityBarBadge.background": "#2188ff",
|
||||
"activityBar.activeBorder": "#f9826c",
|
||||
"activityBar.border": "#e1e4e8",
|
||||
"sideBar.foreground": "#24292e",
|
||||
"sideBar.background": "#f6f8fa",
|
||||
"sideBar.border": "#e1e4e8",
|
||||
"sideBarTitle.foreground": "#24292e",
|
||||
"sideBarSectionHeader.foreground": "#24292e",
|
||||
"sideBarSectionHeader.background": "#f6f8fa",
|
||||
"sideBarSectionHeader.border": "#e1e4e8",
|
||||
"list.hoverForeground": "#24292e",
|
||||
"list.inactiveSelectionForeground": "#24292e",
|
||||
"list.activeSelectionForeground": "#24292e",
|
||||
"list.hoverBackground": "#ebf0f4",
|
||||
"list.inactiveSelectionBackground": "#e8eaed",
|
||||
"list.activeSelectionBackground": "#e2e5e9",
|
||||
"list.focusForeground": "#05264c",
|
||||
"list.focusBackground": "#cce5ff",
|
||||
"list.inactiveFocusBackground": "#dbedff",
|
||||
"list.highlightForeground": "#0366d6",
|
||||
"tree.indentGuidesStroke": "#eaecef",
|
||||
"notificationCenterHeader.foreground": "#6a737d",
|
||||
"notificationCenterHeader.background": "#e1e4e8",
|
||||
"notifications.foreground": "#586069",
|
||||
"notifications.background": "#fafbfc",
|
||||
"notifications.border": "#e1e4e8",
|
||||
"notificationsErrorIcon.foreground": "#d73a49",
|
||||
"notificationsWarningIcon.foreground": "#e36209",
|
||||
"notificationsInfoIcon.foreground": "#005cc5",
|
||||
"pickerGroup.border": "#e1e4e8",
|
||||
"pickerGroup.foreground": "#586069",
|
||||
"quickInput.background": "#fafbfc",
|
||||
"quickInput.foreground": "#24292e",
|
||||
"statusBar.foreground": "#586069",
|
||||
"statusBar.background": "#fafafa",
|
||||
"statusBar.border": "#e1e4e8",
|
||||
"statusBar.noFolderBackground": "#fafafa",
|
||||
"statusBar.debuggingBackground": "#d73a49",
|
||||
"statusBar.debuggingForeground": "#fafafa",
|
||||
"statusBarItem.prominentBackground": "#f6f8fa",
|
||||
"editorGroupHeader.tabsBackground": "#f6f8fa",
|
||||
"editorGroupHeader.tabsBorder": "#e1e4e8",
|
||||
"editorGroup.border": "#e1e4e8",
|
||||
"tab.activeForeground": "#24292e",
|
||||
"tab.inactiveForeground": "#6a737d",
|
||||
"tab.inactiveBackground": "#f6f8fa",
|
||||
"tab.activeBackground": "#fafafa",
|
||||
"tab.hoverBackground": "#fafafa",
|
||||
"tab.unfocusedHoverBackground": "#f6f8fa",
|
||||
"tab.border": "#e1e4e8",
|
||||
"tab.unfocusedActiveBorderTop": "#e1e4e8",
|
||||
"tab.activeBorder": "#fafafa",
|
||||
"tab.unfocusedActiveBorder": "#fafafa",
|
||||
"tab.activeBorderTop": "#f9826c",
|
||||
"breadcrumb.foreground": "#6a737d",
|
||||
"breadcrumb.focusForeground": "#24292e",
|
||||
"breadcrumb.activeSelectionForeground": "#586069",
|
||||
"breadcrumbPicker.background": "#fafafa",
|
||||
"editor.foreground": "#24292e",
|
||||
"editor.background": "#fafafa",
|
||||
"editorWidget.background": "#fafafa",
|
||||
"editor.foldBackground": "#959da51a",
|
||||
"editor.lineHighlightBackground": "#fafbfc",
|
||||
"editorLineNumber.foreground": "#959da5",
|
||||
"editorLineNumber.activeForeground": "#24292e",
|
||||
"editorIndentGuide.background": "#eaecef",
|
||||
"editorIndentGuide.activeBackground": "#e1e4e8",
|
||||
"editorWhitespace.foreground": "#d1d5da",
|
||||
"editorCursor.foreground": "#044289",
|
||||
"editor.findMatchBackground": "#ffdf5d",
|
||||
"editor.findMatchHighlightBackground": "#ffdf5d66",
|
||||
"editor.linkedEditingBackground": "#0366d611",
|
||||
"editor.inactiveSelectionBackground": "#0366d611",
|
||||
"editor.selectionBackground": "#0366d625",
|
||||
"editor.selectionHighlightBackground": "#34d05840",
|
||||
"editor.selectionHighlightBorder": "#34d05800",
|
||||
"editor.wordHighlightBackground": "#34d05800",
|
||||
"editor.wordHighlightStrongBackground": "#34d05800",
|
||||
"editor.wordHighlightBorder": "#24943e99",
|
||||
"editor.wordHighlightStrongBorder": "#24943e50",
|
||||
"editorBracketMatch.background": "#34d05840",
|
||||
"editorBracketMatch.border": "#34d05800",
|
||||
"editorGutter.modifiedBackground": "#f9c513",
|
||||
"editorGutter.addedBackground": "#34d058",
|
||||
"editorGutter.deletedBackground": "#d73a49",
|
||||
"diffEditor.insertedTextBackground": "#85e89d33",
|
||||
"diffEditor.removedTextBackground": "#f9758326",
|
||||
"scrollbar.shadow": "#6a737d33",
|
||||
"scrollbarSlider.background": "#959da533",
|
||||
"scrollbarSlider.hoverBackground": "#959da544",
|
||||
"scrollbarSlider.activeBackground": "#959da588",
|
||||
"editorOverviewRuler.border": "#fafafa",
|
||||
"panel.background": "#f6f8fa",
|
||||
"panel.border": "#e1e4e8",
|
||||
"panelTitle.activeBorder": "#f9826c",
|
||||
"panelTitle.activeForeground": "#24292e",
|
||||
"panelTitle.inactiveForeground": "#6a737d",
|
||||
"panelInput.border": "#e1e4e8",
|
||||
"terminal.foreground": "#383a42",
|
||||
"terminal.background": "#fafafa",
|
||||
"terminal.selectionForeground": "#383a42",
|
||||
"terminal.selectionBackground": "#bfceff",
|
||||
"terminalCursor.foreground": "#cc00be",
|
||||
"terminal.border": "#657b83",
|
||||
"terminal.ansiBlack": "#383a42",
|
||||
"terminal.ansiRed": "#e45649",
|
||||
"terminal.ansiGreen": "#50a14f",
|
||||
"terminal.ansiYellow": "#c18401",
|
||||
"terminal.ansiBlue": "#2f5af3",
|
||||
"terminal.ansiMagenta": "#a626a4",
|
||||
"terminal.ansiCyan": "#00b7eb",
|
||||
"terminal.ansiWhite": "#fafafa",
|
||||
"terminal.ansiBrightBlack": "#797979",
|
||||
"terminal.ansiBrightRed": "#e06c75",
|
||||
"terminal.ansiBrightGreen": "#98c379",
|
||||
"terminal.ansiBrightYellow": "#e5c07b",
|
||||
"terminal.ansiBrightBlue": "#4b72ff",
|
||||
"terminal.ansiBrightMagenta": "#c678dd",
|
||||
"terminal.ansiBrightCyan": "#00b7eb",
|
||||
"terminal.ansiBrightWhite": "#fafafa",
|
||||
"gitDecoration.addedResourceForeground": "#22863a",
|
||||
"gitDecoration.modifiedResourceForeground": "#b08800",
|
||||
"gitDecoration.deletedResourceForeground": "#cb2431",
|
||||
"gitDecoration.untrackedResourceForeground": "#22863a",
|
||||
"gitDecoration.ignoredResourceForeground": "#959da5",
|
||||
"gitDecoration.conflictingResourceForeground": "#b08800",
|
||||
"gitDecoration.submoduleResourceForeground": "#586069",
|
||||
"debugToolBar.background": "#fafafa",
|
||||
"editor.stackFrameHighlightBackground": "#ffd33d33",
|
||||
"editor.focusedStackFrameHighlightBackground": "#28a74525",
|
||||
"settings.headerForeground": "#586069",
|
||||
"settings.modifiedItemIndicator": "#f9c513",
|
||||
"welcomePage.buttonBackground": "#fafbfc",
|
||||
"welcomePage.buttonHoverBackground": "#f3f4f6"
|
||||
},
|
||||
"semanticHighlighting": true,
|
||||
"tokenColors": "./one-light-italic.tmTheme"
|
||||
}
|
||||
@ -338,7 +338,7 @@
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4078F2</string>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
@ -430,7 +430,7 @@
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4078F2</string>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
@ -441,7 +441,7 @@
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4078F2</string>
|
||||
<string>#0184bc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
||||
@ -1,205 +0,0 @@
|
||||
{
|
||||
"name": "One Light Italic",
|
||||
"tokenColors": "./one-light-italic.tmTheme",
|
||||
"colors": {
|
||||
"activityBar.background": "#f1f1f1",
|
||||
"activityBar.dropBackground": "#e8e8e8",
|
||||
"activityBar.foreground": "#383a42",
|
||||
"activityBarBadge.background": "#0099e1",
|
||||
"activityBarBadge.foreground": "#ffffff",
|
||||
"badge.background": "#0099e1",
|
||||
"badge.foreground": "#ffffff",
|
||||
"breadcrumb.activeSelectionForeground": "#009ae5",
|
||||
"breadcrumb.focusForeground": "#383a42",
|
||||
"breadcrumb.foreground": "#a0a1a7",
|
||||
"button.background": "#0083c0",
|
||||
"button.foreground": "#ffffff",
|
||||
"button.hoverBackground": "#0099e1",
|
||||
"debugExceptionWidget.background": "#ffcccc",
|
||||
"debugExceptionWidget.border": "#ff2e3f",
|
||||
"debugToolBar.background": "#eeeeee",
|
||||
"diffEditor.insertedTextBackground": "#1ef1531f",
|
||||
"diffEditor.removedTextBackground": "#f33b5127",
|
||||
"dropdown.background": "#e8e8e8",
|
||||
"dropdown.border": "#d5d7d8",
|
||||
"dropdown.foreground": "#383a42",
|
||||
"dropdown.listBackground": "#e8e8e8",
|
||||
"editor.background": "#f7f7f7",
|
||||
"editor.findMatchBackground": "#99e5c2c5",
|
||||
"editor.findMatchBorder": "#f31459",
|
||||
"editor.findMatchHighlightBackground": "#99e5c2c5",
|
||||
"editor.findRangeHighlightBackground": "#a0a1a72d",
|
||||
"editor.foreground": "#383a42",
|
||||
"editor.hoverHighlightBackground": "#e8e8e8",
|
||||
"editor.lineHighlightBackground": "#f1f1f1",
|
||||
"editor.rangeHighlightBackground": "#a0a1a70e",
|
||||
"editor.selectionBackground": "#d2ecff",
|
||||
"editor.selectionHighlightBackground": "#e8e8e8",
|
||||
"editor.snippetFinalTabstopHighlightBackground": "#a0a1a733",
|
||||
"editor.snippetFinalTabstopHighlightBorder": "#a0a1a7",
|
||||
"editor.snippetTabstopHighlightBackground": "#a0a1a733",
|
||||
"editor.snippetTabstopHighlightBorder": "#a0a1a7",
|
||||
"editor.wordHighlightBackground": "#d9e6fd",
|
||||
"editor.wordHighlightStrongBackground": "#ecd1e5",
|
||||
"editorBracketMatch.background": "#00000000",
|
||||
"editorBracketMatch.border": "#7a82da",
|
||||
"editorCodeLens.foreground": "#a0a1a7",
|
||||
"editorCursor.background": "#f9f9f9",
|
||||
"editorCursor.foreground": "#f31459",
|
||||
"editorGroup.border": "#d5d7d8",
|
||||
"editorGroup.dropBackground": "#009ae128",
|
||||
"editorGroup.emptyBackground": "#e8e8e8",
|
||||
"editorGroup.focusedEmptyBorder": "#0099e1",
|
||||
"editorGroupHeader.noTabsBackground": "#e8e8e8",
|
||||
"editorGroupHeader.tabsBackground": "#e8e8e8",
|
||||
"editorGutter.addedBackground": "#3cbc66",
|
||||
"editorGutter.deletedBackground": "#ff6480",
|
||||
"editorGutter.modifiedBackground": "#0099e1",
|
||||
"editorHint.foreground": "#a0a1a7",
|
||||
"editorIndentGuide.activeBackground": "#939393",
|
||||
"editorInfo.foreground": "#0099e1",
|
||||
"editorLineNumber.activeForeground": "#f31459",
|
||||
"editorLineNumber.foreground": "#a0a1a7",
|
||||
"editorLink.activeForeground": "#0099e1",
|
||||
"editorMarkerNavigation.background": "#f9f9f9",
|
||||
"editorOverviewRuler.addedForeground": "#3cbc66",
|
||||
"editorOverviewRuler.bracketMatchForeground": "#7a82da",
|
||||
"editorOverviewRuler.deletedForeground": "#ff6480",
|
||||
"editorOverviewRuler.errorForeground": "#ff0000",
|
||||
"editorOverviewRuler.findMatchForeground": "#99e5c2c5",
|
||||
"editorOverviewRuler.infoForeground": "#0099e1",
|
||||
"editorOverviewRuler.modifiedForeground": "#0099e1",
|
||||
"editorOverviewRuler.selectionHighlightForeground": "#d2ecff",
|
||||
"editorOverviewRuler.warningForeground": "#df631c",
|
||||
"editorOverviewRuler.wordHighlightForeground": "#d9e6fd",
|
||||
"editorPane.background": "#eeeeee",
|
||||
"editorRuler.foreground": "#d5d7d8",
|
||||
"editorWarning.foreground": "#df631c",
|
||||
"editorWhitespace.foreground": "#d5d7d8",
|
||||
"editorWidget.background": "#e8e8e8",
|
||||
"editorWidget.border": "#d5d7d8",
|
||||
"errorForeground": "#ff0000",
|
||||
"extensionButton.prominentBackground": "#1f8642",
|
||||
"extensionButton.prominentForeground": "#ffffff",
|
||||
"extensionButton.prominentHoverBackground": "#23974a",
|
||||
"focusBorder": "#0099e1",
|
||||
"foreground": "#383a42",
|
||||
"gitDecoration.conflictingResourceForeground": "#d52753",
|
||||
"gitDecoration.deletedResourceForeground": "#a05a48",
|
||||
"gitDecoration.ignoredResourceForeground": "#a0a1a7",
|
||||
"gitDecoration.modifiedResourceForeground": "#0099e1",
|
||||
"gitDecoration.untrackedResourceForeground": "#23974a",
|
||||
"gitlens.gutterBackgroundColor": "#ffffff55",
|
||||
"gitlens.gutterForegroundColor": "#383a42",
|
||||
"gitlens.gutterUncommittedForegroundColor": "#0099e1",
|
||||
"gitlens.lineHighlightBackgroundColor": "#d2ecff",
|
||||
"gitlens.lineHighlightOverviewRulerColor": "#d2ecff",
|
||||
"gitlens.trailingLineBackgroundColor": "#d2ecff",
|
||||
"gitlens.trailingLineForegroundColor": "#a0a1a7",
|
||||
"input.background": "#f9f9f9",
|
||||
"input.border": "#d5d7d8",
|
||||
"input.foreground": "#383a42",
|
||||
"input.placeholderForeground": "#a0a1a7",
|
||||
"inputOption.activeBorder": "#0099e1",
|
||||
"inputValidation.errorBackground": "#ffcccc",
|
||||
"inputValidation.errorBorder": "#ff2e3f",
|
||||
"inputValidation.infoBackground": "#d2ecff",
|
||||
"inputValidation.infoBorder": "#0099e1",
|
||||
"inputValidation.warningBackground": "#debaa6",
|
||||
"inputValidation.warningBorder": "#df631c",
|
||||
"list.activeSelectionBackground": "#00a7f5",
|
||||
"list.activeSelectionForeground": "#ffffff",
|
||||
"list.dropBackground": "#d2ecff",
|
||||
"list.focusBackground": "#d2ecff",
|
||||
"list.focusForeground": "#000000",
|
||||
"list.highlightForeground": "#0098dd",
|
||||
"list.hoverBackground": "#f1f1f1",
|
||||
"list.inactiveSelectionBackground": "#f6f6f6",
|
||||
"list.warningForeground": "#df631c",
|
||||
"merge.currentContentBackground": "#a05a481c",
|
||||
"merge.currentHeaderBackground": "#a05a483b",
|
||||
"merge.incomingContentBackground": "#009ae121",
|
||||
"merge.incomingHeaderBackground": "#009ae13b",
|
||||
"notificationCenter.border": "#d5d7d8",
|
||||
"notificationCenterHeader.background": "#d5d7d8",
|
||||
"notificationCenterHeader.foreground": "#383a42",
|
||||
"notificationLink.foreground": "#0099e1",
|
||||
"notificationToast.border": "#d5d7d8",
|
||||
"notifications.background": "#e8e8e8",
|
||||
"notifications.border": "#d5d7d8",
|
||||
"notifications.foreground": "#383a42",
|
||||
"panel.border": "#d5d7d8",
|
||||
"panel.dropBackground": "#e8e8e8",
|
||||
"panelTitle.activeBorder": "#0099e1",
|
||||
"panelTitle.activeForeground": "#383a42",
|
||||
"panelTitle.inactiveForeground": "#383a42aa",
|
||||
"peekView.border": "#0099e1",
|
||||
"peekViewEditor.background": "#f9f9f9",
|
||||
"peekViewEditor.matchHighlightBackground": "#99e5c1",
|
||||
"peekViewResult.background": "#e8e8e8",
|
||||
"peekViewResult.fileForeground": "#383a42",
|
||||
"peekViewResult.lineForeground": "#383a42",
|
||||
"peekViewResult.matchHighlightBackground": "#99e5c1",
|
||||
"peekViewResult.selectionBackground": "#0099e1",
|
||||
"peekViewResult.selectionForeground": "#ffffff",
|
||||
"peekViewTitle.background": "#e8e8e8",
|
||||
"peekViewTitleDescription.foreground": "#a0a1a7",
|
||||
"peekViewTitleLabel.foreground": "#383a42",
|
||||
"pickerGroup.border": "#d5d7d8",
|
||||
"pickerGroup.foreground": "#0099e1",
|
||||
"progressBar.background": "#0099e1",
|
||||
"scrollbarSlider.activeBackground": "#bebebe99",
|
||||
"scrollbarSlider.background": "#dedede99",
|
||||
"scrollbarSlider.hoverBackground": "#cecece99",
|
||||
"selection.background": "#d2ecff",
|
||||
"sideBar.background": "#E8E8E8",
|
||||
"sideBar.border": "#d1d1d1",
|
||||
"sideBar.dropBackground": "#e8e8e8",
|
||||
"sideBar.foreground": "#383a42",
|
||||
"sideBarSectionHeader.background": "#d5d7d8",
|
||||
"sideBarSectionHeader.foreground": "#383a42",
|
||||
"sideBarTitle.foreground": "#383a42",
|
||||
"statusBar.background": "#0099e1",
|
||||
"statusBar.debuggingBackground": "#df631c",
|
||||
"statusBar.foreground": "#ffffff",
|
||||
"statusBar.noFolderBackground": "#823ff1",
|
||||
"tab.activeBorderTop": "#0099e1",
|
||||
"tab.activeForeground": "#383a42",
|
||||
"tab.hoverBackground": "#f1f1f1",
|
||||
"tab.inactiveBackground": "#eeeeee",
|
||||
"tab.inactiveForeground": "#a0a1a7",
|
||||
"tab.unfocusedActiveBorderTop": "#a0a1a7",
|
||||
"terminal.ansiBlack": "#d5d6dd",
|
||||
"terminal.ansiBlue": "#275fe4",
|
||||
"terminal.ansiBrightBlack": "#e4e5ed",
|
||||
"terminal.ansiBrightBlue": "#0099e1",
|
||||
"terminal.ansiBrightCyan": "#6d93bb",
|
||||
"terminal.ansiBrightGreen": "#3cbc66",
|
||||
"terminal.ansiBrightMagenta": "#ce33c0",
|
||||
"terminal.ansiBrightRed": "#ff6480",
|
||||
"terminal.ansiBrightWhite": "#26272d",
|
||||
"terminal.ansiBrightYellow": "#c5a332",
|
||||
"terminal.ansiCyan": "#27618d",
|
||||
"terminal.ansiGreen": "#23974a",
|
||||
"terminal.ansiMagenta": "#823ff1",
|
||||
"terminal.ansiRed": "#d52753",
|
||||
"terminal.ansiWhite": "#000000",
|
||||
"terminal.ansiYellow": "#df631c",
|
||||
"terminalCursor.foreground": "#f31459",
|
||||
"textBlockQuote.background": "#d5d7d8",
|
||||
"textBlockQuote.border": "#0099e1",
|
||||
"textCodeBlock.background": "#d5d7d8",
|
||||
"textLink.activeForeground": "#0099e1",
|
||||
"textLink.foreground": "#0099e1",
|
||||
"textPreformat.foreground": "#a05a48",
|
||||
"textSeparator.foreground": "#d5d7d8",
|
||||
"titleBar.activeBackground": "#c2c4c7",
|
||||
"titleBar.activeForeground": "#383a42",
|
||||
"titleBar.inactiveBackground": "#c2c4c799",
|
||||
"titleBar.inactiveForeground": "#383a4299",
|
||||
"walkThrough.embeddedEditorBackground": "#e8e8e8",
|
||||
"welcomePage.buttonBackground": "#e8e8e8",
|
||||
"welcomePage.buttonHoverBackground": "#d2ecff",
|
||||
"widget.shadow": "#a0a1a7"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user