Skip to content

Instantly share code, notes, and snippets.

@tiagodalloca
Last active October 6, 2016 20:09
Show Gist options
  • Save tiagodalloca/a6d190eff322c1152e6c3afb17656bb1 to your computer and use it in GitHub Desktop.
Save tiagodalloca/a6d190eff322c1152e6c3afb17656bb1 to your computer and use it in GitHub Desktop.
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
# console.log "Saved! #{editor.getPath()}"
# TextEditor = require 'text-editor'
# Console = require './packages/atom-ink/lib/console/console.coffee'
atom.workspace.getActiveTextEditor = ->
activeItem = this.getActivePaneItem()
if activeItem == null
return null;
else if typeof activeItem == "undefined"
return null;
else if activeItem.constructor.name == 'TextEditor'
return activeItem
else
if activeItem.constructor.name == 'Console'
i = activeItem.getInput();
if typeof i == "undefined"
return null
else
return i.editor
atom.workspace.getTextEditors = ->
a = this.getPaneItems();
ret = [];
for item in a
if item.constructor.name == 'TextEditor'
ret.push item
else
if item.constructor.name == 'Console'
i = item.getInput();
if typeof i != "undefined" && i != null
ret.push i.editor
return ret;
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
#
# 'atom-text-editor':
# 'enter': 'editor:newline'
#
# 'atom-workspace':
# 'ctrl-shift-p': 'core:move-up'
# 'ctrl-p': 'core:move-down'
#
# You can find more information about keymaps in these guides:
# * https://atom.io/docs/latest/using-atom-basic-customization#customizing-key-bindings
# * https://atom.io/docs/latest/behind-atom-keymaps-in-depth
#
# If you're having trouble with your keybindings not working, try the
# Keybinding Resolver: `Cmd+.` on OS X and `Ctrl+.` on other platforms. See the
# Debugging Guide for more information:
# * https://atom.io/docs/latest/hacking-atom-debugging#check-the-keybindings
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# https://atom.io/docs/latest/using-atom-basic-customization#cson
'atom-text-editor[data-grammar~="clojure"].autocomplete-active':
'enter': 'autocomplete-plus:confirm'
'ink-console atom-text-editor[data-grammar~="clojure"].autocomplete-active':
'enter': 'autocomplete-plus:confirm'
'atom-workspace atom-text-editor[data-grammar~="clojure"]':
'tab': 'editor:indent'
[
{
"name": "about",
"version": "1.5.3"
},
{
"name": "archive-view",
"version": "0.61.1"
},
{
"name": "atom-beautify",
"version": "0.29.13"
},
{
"name": "atom-dark-syntax",
"version": "0.27.0",
"theme": "syntax"
},
{
"name": "atom-dark-ui",
"version": "0.52.0",
"theme": "ui"
},
{
"name": "atom-light-syntax",
"version": "0.28.0",
"theme": "syntax"
},
{
"name": "atom-light-ui",
"version": "0.44.0",
"theme": "ui"
},
{
"name": "atom-material-syntax",
"version": "0.4.6",
"theme": "syntax"
},
{
"name": "atom-material-syntax-dark",
"version": "0.2.5",
"theme": "syntax"
},
{
"name": "atom-monokai",
"version": "0.10.4",
"theme": "syntax"
},
{
"name": "atom-ternjs",
"version": "0.15.0"
},
{
"name": "atomic-chrome",
"version": "0.3.0"
},
{
"name": "autoclose-html",
"version": "0.23.0"
},
{
"name": "autocomplete-atom-api",
"version": "0.10.0"
},
{
"name": "autocomplete-clang",
"version": "0.10.0"
},
{
"name": "autocomplete-css",
"version": "0.11.2"
},
{
"name": "autocomplete-html",
"version": "0.7.2"
},
{
"name": "autocomplete-plus",
"version": "2.31.1"
},
{
"name": "autocomplete-snippets",
"version": "1.11.0"
},
{
"name": "autoflow",
"version": "0.27.0"
},
{
"name": "autosave",
"version": "0.23.1"
},
{
"name": "background-tips",
"version": "0.26.1"
},
{
"name": "base16-tomorrow-dark-theme",
"version": "1.1.0",
"theme": "syntax"
},
{
"name": "base16-tomorrow-light-theme",
"version": "1.1.1",
"theme": "syntax"
},
{
"name": "bookmarks",
"version": "0.41.0"
},
{
"name": "bracket-matcher",
"version": "0.82.1"
},
{
"name": "calc",
"version": "0.4.0"
},
{
"name": "color-picker",
"version": "2.2.2"
},
{
"name": "command-palette",
"version": "0.38.0"
},
{
"name": "cson-parser",
"version": "0.1.0"
},
{
"name": "deprecation-cop",
"version": "0.54.1"
},
{
"name": "dev-live-reload",
"version": "0.47.0"
},
{
"name": "docblockr",
"version": "0.8.7"
},
{
"name": "emmet",
"version": "2.4.3"
},
{
"name": "encoding-selector",
"version": "0.22.0"
},
{
"name": "eval-javascript",
"version": "1.2.0"
},
{
"name": "exception-reporting",
"version": "0.39.0"
},
{
"name": "file-icons",
"version": "1.7.20"
},
{
"name": "find-and-replace",
"version": "0.201.0"
},
{
"name": "fonts",
"version": "1.6.0"
},
{
"name": "fuzzy-finder",
"version": "1.3.0"
},
{
"name": "git-diff",
"version": "1.1.0"
},
{
"name": "git-history",
"version": "3.2.0"
},
{
"name": "git-log",
"version": "0.4.1"
},
{
"name": "git-plus",
"version": "5.18.0"
},
{
"name": "github-atom-light-syntax",
"version": "0.2.0",
"theme": "syntax"
},
{
"name": "go-to-line",
"version": "0.31.0"
},
{
"name": "grammar-selector",
"version": "0.48.1"
},
{
"name": "highlight-selected",
"version": "0.11.2"
},
{
"name": "image-view",
"version": "0.58.2"
},
{
"name": "incompatible-packages",
"version": "0.26.1"
},
{
"name": "keybinding-resolver",
"version": "0.35.0"
},
{
"name": "language-c",
"version": "0.52.1"
},
{
"name": "language-clojure",
"version": "0.21.0"
},
{
"name": "language-coffee-script",
"version": "0.47.2"
},
{
"name": "language-csharp",
"version": "0.12.1"
},
{
"name": "language-css",
"version": "0.37.1"
},
{
"name": "language-emacs-lisp",
"version": "1.1.1"
},
{
"name": "language-gfm",
"version": "0.88.0"
},
{
"name": "language-git",
"version": "0.15.0"
},
{
"name": "language-gitignore",
"version": "0.2.0"
},
{
"name": "language-go",
"version": "0.42.1"
},
{
"name": "language-html",
"version": "0.45.1"
},
{
"name": "language-hyperlink",
"version": "0.16.0"
},
{
"name": "language-ini",
"version": "1.16.0"
},
{
"name": "language-java",
"version": "0.23.0"
},
{
"name": "language-javascript",
"version": "0.119.0"
},
{
"name": "language-json",
"version": "0.18.2"
},
{
"name": "language-less",
"version": "0.29.5"
},
{
"name": "language-make",
"version": "0.22.2"
},
{
"name": "language-mustache",
"version": "0.13.0"
},
{
"name": "language-objective-c",
"version": "0.15.1"
},
{
"name": "language-ocaml",
"version": "1.1.2"
},
{
"name": "language-perl",
"version": "0.35.0"
},
{
"name": "language-php",
"version": "0.37.2"
},
{
"name": "language-property-list",
"version": "0.8.0"
},
{
"name": "language-python",
"version": "0.45.0"
},
{
"name": "language-ruby",
"version": "0.69.0"
},
{
"name": "language-ruby-on-rails",
"version": "0.25.0"
},
{
"name": "language-sass",
"version": "0.56.0"
},
{
"name": "language-shellscript",
"version": "0.22.4"
},
{
"name": "language-source",
"version": "0.9.0"
},
{
"name": "language-sql",
"version": "0.23.0"
},
{
"name": "language-text",
"version": "0.7.1"
},
{
"name": "language-thrift",
"version": "1.0.2"
},
{
"name": "language-todo",
"version": "0.28.0"
},
{
"name": "language-toml",
"version": "0.18.0"
},
{
"name": "language-xml",
"version": "0.34.9"
},
{
"name": "language-yaml",
"version": "0.26.0"
},
{
"name": "line-ending-selector",
"version": "0.5.0"
},
{
"name": "link",
"version": "0.31.1"
},
{
"name": "linter",
"version": "1.11.16"
},
{
"name": "linter-clang",
"version": "3.4.4"
},
{
"name": "linter-jshint",
"version": "2.1.0"
},
{
"name": "markdown-pdf",
"version": "1.5.0"
},
{
"name": "markdown-preview-plus",
"version": "2.4.0"
},
{
"name": "material-syntax",
"version": "0.5.0",
"theme": "syntax"
},
{
"name": "merge-conflicts",
"version": "1.4.4"
},
{
"name": "metrics",
"version": "0.53.1"
},
{
"name": "minimap",
"version": "4.25.0"
},
{
"name": "monokai-solarized-dark",
"version": "0.1.1",
"theme": "syntax"
},
{
"name": "mr-monokai",
"version": "1.0.0",
"theme": "syntax"
},
{
"name": "notifications",
"version": "0.65.0"
},
{
"name": "one-dark-syntax",
"version": "1.3.0",
"theme": "syntax"
},
{
"name": "one-dark-ui",
"version": "1.5.0",
"theme": "ui"
},
{
"name": "one-light-syntax",
"version": "1.3.0",
"theme": "syntax"
},
{
"name": "one-light-ui",
"version": "1.5.0",
"theme": "ui"
},
{
"name": "open-on-github",
"version": "1.2.0"
},
{
"name": "package-generator",
"version": "1.0.0"
},
{
"name": "pdf-view",
"version": "0.50.0"
},
{
"name": "pigments",
"version": "0.37.0"
},
{
"name": "proto-repl",
"version": "1.4.7"
},
{
"name": "settings-view",
"version": "0.242.2"
},
{
"name": "snippets",
"version": "1.0.2"
},
{
"name": "solarized-dark-syntax",
"version": "1.0.2",
"theme": "syntax"
},
{
"name": "solarized-dark-ui",
"version": "0.3.1",
"theme": "ui"
},
{
"name": "solarized-light-syntax",
"version": "1.0.2",
"theme": "syntax"
},
{
"name": "spell-check",
"version": "0.67.1"
},
{
"name": "status-bar",
"version": "1.4.1"
},
{
"name": "styleguide",
"version": "0.47.0"
},
{
"name": "sublimify",
"version": "0.5.0",
"theme": "ui"
},
{
"name": "symbols-view",
"version": "0.113.0"
},
{
"name": "sync-settings",
"version": "0.7.2"
},
{
"name": "tabs",
"version": "0.100.2"
},
{
"name": "tabs-to-spaces",
"version": "1.0.2"
},
{
"name": "timecop",
"version": "0.33.2"
},
{
"name": "tree-view",
"version": "0.208.2"
},
{
"name": "update-package-dependencies",
"version": "0.10.0"
},
{
"name": "whitespace",
"version": "0.33.0"
},
{
"name": "wrap-guide",
"version": "0.38.1"
}
]
{
"atom-beautify": {
"coffeescript": {
"default_beautifier": "Coffee Formatter",
"indent_size": 2,
"wrap_line_length": 70
},
"css": {
"indent_size": 2
},
"general": {
"_analyticsUserId": "4ebe91ac-f50e-403d-b15c-09c633251af4"
},
"html": {
"indent_size": 2
},
"js": {
"indent_size": 2
},
"json": {
"indent_size": 2,
"jslint_happy": true
},
"less": {
"indent_size": 2
}
},
"atom-material-ui": {
"colors": {
"abaseColor": {
"alpha": 1,
"blue": 243,
"green": 150,
"red": 33
},
"predefinedColor": "Blue"
},
"tabs": {
"compactTabs": true
},
"treeView": {
"compactList": true
}
},
"atom-ternjs": {
"useSnippets": true,
"useSnippetsAndFunction": true
},
"core": {
"disabledPackages": [
"atom-sharp",
"autocomplete-php",
"activate-power-mode",
"wakatime",
"git-status",
"nuclide",
"tool-bar",
"sort-lines",
"linter-js-standard",
"linter-php",
"atom-autocomplete-php",
"linter-clojure",
"welcome",
"markdown-preview"
],
"projectHome": "Z:\\\\github",
"themes": [
"sublimify",
"mr-monokai"
]
},
"data-log": {
"format": "yyyy/mm/dd H:MM:ss TT"
},
"editor": {
"fontFamily": "Consolas",
"fontSize": 16,
"invisibles": {
"cr": " ",
"eol": " "
},
"lineHeight": 1.3,
"scrollPastEnd": true,
"showInvisibles": true
},
"exception-reporting": {
"userId": "8f10e0b6-798f-9344-00a9-a7221ccac8c7"
},
"file-watcher": {
"promptWhenFileHasChangedOnDisk": false
},
"fonts": {
"fontFamily": "Ubuntu Mono"
},
"git-plus": {
"gitPath": "C:\\Program Files\\Git\\bin\\git.exe"
},
"linter": {
"errorPanelHeight": 22,
"ignoreMatchedFiles": "/**/*.min.{js,css} /**/*.md"
},
"linter-js-standard": {
"style": "happiness"
},
"linter-jshint": {
"disableWhenNoJshintrcFileInPath": true
},
"markdown-pdf": {
"syntax": "mr-monokai"
},
"markdown-preview": {
"breakOnSingleNewline": true
},
"markdown-preview-plus": {
"breakOnSingleNewline": true
},
"markdown-table-formatter": {
"formatOnSave": false
},
"markdown-writer": {
"fileExtension": ".md"
},
"minimap": {
"absoluteMode": true,
"plugins": {
"data-log": true,
"data-logDecorationsZIndex": 0,
"pigments": false,
"pigmentsDecorationsZIndex": 0
}
},
"nuclide": {
"installRecommendedPackages": true,
"nuclide-distraction-free-mode": {
"hideStatusBar": true,
"hideToolBar": true
},
"nuclide-file-tree": {
"hideIgnoredNames": false
},
"nuclide-home": {
"showHome": false
}
},
"one-dark-ui": {
"layoutMode": "Compact"
},
"one-light-ui": {
"layoutMode": "Compact"
},
"package-generator": {
"packageSyntax": "coffeescript"
},
"pigments": {
"markerType": "dot"
},
"proto-repl": {
"autoPrettyPrint": true,
"autoScroll": false,
"bootPath": ".\\",
"leinPath": "C:\\Users\\u15194\\.lein\\bin\\lein.bat"
},
"sync-settings": {},
"tool-bar": {
"fullWidth": false,
"position": "Left"
},
"tree-view": {
"hideVcsIgnoredFiles": true,
"showOnRightSide": true
},
"welcome": {
"showOnStartup": false
}
}
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
# 'Console log':
# 'prefix': 'log'
# 'body': 'console.log $1'
#
# Each scope (e.g. '.source.coffee' above) can only be declared once.
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# https://atom.io/docs/latest/using-atom-basic-customization#cson
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
@import "syntax-variables";
@import "ui-variables";
@syntax-gutter-background-color: transparent;
.tree-view {
// background: @light-color;
// .directory.entry.list-nested-item{
// transition: all ease 0.3s;
// }
.list-item{
transition: all ease 0.3s;
}
.list-item:hover,
.header.list-item:hover{
color: @syntax-color-removed;
}
// .list-item.selected {
// background: @syntax-background-color;
// }
//
// .list-tree li.list-nested-item.selected > .list-item,
// .list-tree .list-item.selected .name{
// color: darken(@syntax-color-removed, 10%);
// }
}
atom-text-editor::shadow .cursor {
border-color: @syntax-color-removed;
transition: opacity 0.5s;
}
.command-palette .list-group li:not(.list-nested-item),
atom-panel.modal .select-list ol.list-group li, .overlay .select-list ol.list-group li, atom-panel.modal.select-list ol.list-group li, .overlay.select-list ol.list-group li{
color: @syntax-text-color;
}
.command-palette .list-group .character-match{
color: @syntax-color-renamed;
}
.git-palette .commnad{
}
atom-pane-container atom-pane .item-views .pane-item{
color: @syntax-text-color;
}
.git-view{
color: rgba(255, 76, 28, 1);
}
.proto-repl-repl::shadow .lisp-syntax-error .region {
background-color: rgba(0, 0, 0, 0) !important;
}
autocomplete-suggestion-list.select-list.popover-list {
// Giving a fixed with to the completion popup
// prevents from flickering during different suggestions
min-width: 400px;
max-width: 400px;
overflow-x: hidden;
// Giving a fixed height to the popup prevents from
// moving up and down when we are typing at the
// bottom of the file. For some reason it won't grow
// more than 350px in my editor, so consider this the
// maximum value.
min-height: 100px;
max-height: 400px;
// This position pulls down the description completion
// (for example for css properties).
& > .suggestion-description {
max-height: 28px;
min-height: 28px;
width: 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment