Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into upgrade-clojurescript
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Dec 11, 2015
2 parents 326dfc2 + d65555c commit 64d6d32
Show file tree
Hide file tree
Showing 31 changed files with 458 additions and 198 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -9,6 +9,7 @@ When filing a bug on GitHub, please help us help you by including the following:
* *Steps to reproduce the bug.*
* Your operating system, LT and relevant plugin versions.
* Relevant configuration in your user.keymap and user.behaviors.
* Error messages you see in your console. In your menu, select`View > Commands` and then search for and execute the `Console: Open the console in a tab` command. Go to the console tab and copy and paste its errors.

Note: The issue tracker is mainly for bugs. Questions should be asked on the [Light Table Google group](https://groups.google.com/forum/#!forum/light-table-discussion).

Expand Down Expand Up @@ -37,3 +38,6 @@ When contributing:
* Please add docstrings to non-trivial functions that are added. Most existing code doesn't have this but we'd like to improve this.
* We are not currently seeking refactoring contributions or code convention tweaks e.g. whitespace. This may change at a later point when we have automated tests and an explicit code convention.
* For contributions to a [vendored dependency](doc/for-committers.md#node-packages), they must be sent upstream and then we can update to the new version.
* For plugins and files that come from CodeMirror, usually under codemirror/, we do not take pull requests.
Instead, send a pull request [to CodeMirror](https://github.com/codemirror/CodeMirror). Once they release a new version we can
upgrade it on a plugin. Thanks!
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -8,12 +8,20 @@ Light Table is a next generation code editor that connects you to your creation

Prebuilt binaries are available through [lighttable.com](http://lighttable.com). To build and use a developer version of Light Table [see these instructions](doc/developer-install.md).

For OSX users, the install process involves the following steps until we officially sign our OSX App:

* In Finder, Ctrl-click on LightTable.app/ and select Open.
* When you see [this prompt](https://cloud.githubusercontent.com/assets/11994/11731454/85181e90-9f69-11e5-9c65-f6aa4228005c.png) about LightTable being unidentified, click Open.
* If Ctrl-click doesn't work for you, open System Preferences > Security & Privacy > General, temporarily change "Allow apps downloaded from:" to Anywhere and double click on LightTable.app.

## Documentation

* See [docs.lighttable.com](http://docs.lighttable.com/) for official user documentation and tutorials.
* See the [community wiki](https://github.com/LightTable/LightTable/wiki) which includes a [User FAQ](https://github.com/LightTable/LightTable/wiki/FAQ) and a [For Users page](https://github.com/LightTable/LightTable/wiki/For-Users) for additional links.
* For a typical Light Table workflow, [read this](doc/workflow.md).
* To understand how Light Table works, read about its [BOT architecture](doc/BOT.md).
* See [Light Table's API docs](http://lighttable.github.io/LightTable/api/index.html) to see what
plugin authors have access to.
* If you're a user coming from vim or emacs see the [For Vim Users](https://github.com/LightTable/LightTable/wiki/For-Vim-Users) and [For Emacs Users](https://github.com/LightTable/LightTable/wiki/For-Emacs-Users) guides.

## Plugins
Expand Down
35 changes: 28 additions & 7 deletions deploy/core/User/user.behaviors
@@ -1,13 +1,22 @@
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;; Modify this file to add and subtract behaviors. Behaviors allow customization of
;; almost any aspect of LightTable e.g. show line numbers or current theme.
;; A behavior has the following format:
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
;; [:TAG :BEHAVIOR OPTIONAL_ARGUMENTS]
;;
;; * A tag indicates in what context the behavior applies. Common tags are :app and :editor which respectively
;; indicate the behavior can be used anywhere and the behavior only applies to editors.
;;
;; * Behavior is the specific LightTable behavior to configure. To search available behaviors,
;; start typing a search term after :TAG. Once you've found the desired behavior, press TAB to have autocomplete
;; fill in the behavior name.
;;
;; * Optional arguments are arguments to pass to a behavior. If a behavior has arguments they should
;; pop up in an info box after the behavior has been autocompleted.
;;
;; * For more on configuring behaviors see https://github.com/LightTable/LightTable/blob/master/doc/behavior-and-keymap-configuration.md.

[
;; The app tag is kind of like global scope. You assign behaviors that affect
Expand All @@ -27,5 +36,17 @@

;; To subtract a behavior, prefix the name with '-' e.g.
;; [:app :-lt.objs.intro/show-intro]


;; Common behaviors to consider
;; ============================
;; Show line numbers
;; [:editor :lt.objs.editor/line-numbers]
;; Customize font
;; [:app :lt.objs.style/font-settings "Courier New" "11"]
;; Auto-close characters '{[("'. Currently only works in English keyboards
;; [:app :lt.objs.settings/pair-keymap-diffs]
;; Tab settings: Use real tabs, tab size in spaces, spaces per indent
;; [:editor :lt.objs.editor/tab-settings false 2 2]
]

26 changes: 16 additions & 10 deletions deploy/core/User/user.keymap
@@ -1,19 +1,25 @@
;; User keymap
;; -----------------------------
;; Keymaps are stored as a set of diffs that are merged together to create
;; the final set of keys. You can modify these diffs to either add or
;; subtract bindings.
;; Modify this file to add and subtract keybindings (keyboard shortcuts).
;; Keybindings allow custom keys to invoke any desired LightTable functionality that is behind a command.
;; A keybinding has the following format:
;;
;; Like behaviors, keys are bound by tag. When objects with those tags are active
;; the key bindings are live. Keys can be bound to any number of Light Table commands,
;; allowing you the flexibility to execute multiple operations together. To see a list
;; of all the commands you can execute, start typing a word related to the thing you
;; want to do in between the square brackets (e.g. type "editor").

;; [:TAG "KEYS" :COMMAND]
;;
;; * A tag indicates in what context the keybinding applies. Common tags are :app and :editor which respectively
;; indicate the keybinding can be used anywhere and the keybinding can only be used when editing text.
;;
;; * Keys are the actual keys you type for the keybinding. Most keybindings start with modifier(s) e.g. alt or control.
;; Keybindings with modifiers have the format "modifier(s)-key". For example "alt-shift-x" means press alt, shift and x
;; at once. For more on configuring keys see https://github.com/LightTable/LightTable/blob/master/doc/behavior-and-keymap-configuration.md#keys.
;;
;; * Command is the specific LightTable command(s) to invoke. To search available commands,
;; start typing a search term after "KEYS". Once you've found the desired command, press TAB to have autocomplete
;; fill in the command name. For more on configuring commands see https://github.com/LightTable/LightTable/blob/master/doc/behavior-and-keymap-configuration.md#commands-in-keybindings.
[
[:editor "alt-w" :editor.watch.watch-selection]
[:editor "alt-shift-w" :editor.watch.unwatch]

;; To subtract a binding, prefix the key with '-' e.g.
;; To subtract a keybinding, prefix the key with '-' e.g.
;; [:app "-ctrl-shift-d" :docs.search.show]
]
41 changes: 41 additions & 0 deletions deploy/core/changelog.md
@@ -1,5 +1,46 @@
#Changes

## 0.8.0

* CHANGED: We have switched to Electron from NW.js
* CHANGED: LT's releases and self-updating processes are completely in the open on Github
* CHANGED: We no longer ship with a node binary as we're able to use Electon's node binary for background processes
* CHANGED: Proxy support has been disabled. There is an issue for re-enabling it at https://github.com/LightTable/LightTable/issues/1984. We are looking for help on how to QA this.
* CHANGED: `:lt.objs.app/set-default-zoom-level` behavior takes a value from 0 to 1. With NW.js, it could take negative numbers which no longer work and will _freeze_ LT on startup
* CHANGED: When opening a file from the commandline, each invocation opens a new LightTable app regardless of whether LightTable is already open. To optionally bring back the old behavior, see https://github.com/LightTable/LightTable/issues/2014.
* CHANGED: Provide constant port number 5678 for external browser connection
* CHANGED: Beginner friendly explanations to user.keymap and user.behaviors
* CHANGED: 32-bit linux is no longer an official download. Building from source will still be supported
* FIX: Major usability issues on >= OSX 10.10
* FIX: Bug in :editor.force.wrap command
* FIX: Invalid behaviors warning when installing plugin
* FIX: Uninstalling plugin causes misleading missing dialog to popup
* FIX: Installing plugins, loads new behaviors immediately
* FIX: Open files from commandline that have whitespace
* FIX: Styling for folding
* FIX: Creating files under folders with '.' in name
* FIX: Quote and link styling for default theme
* FIX: Fat cursor not showing up when searching in default theme
* FIX: Uncomment command respects line-comment-options behavior
* FIX: Opening file from OSX file manager opens correct file
* FIX: Width of inputs for renaming files in workspace tree
* FIX: Detect latest plugin versions in plugin manager
* ADDED: LT can be built from source with provided scripts across supported platforms
* ADDED: Improved documentation - most core fns have docstrings, all namespaces have docstrings, [API docs](http://lighttable.github.io/LightTable/api/) and [developer docs](https://github.com/LightTable/LightTable/tree/master/doc)
* ADDED: Most of LT's node libraries are installed as npm dependencies instead of as forked libraries
* ADDED: Vector format support for workspace behaviors
* ADDED: Open to line number from commandline e.g. `light FILE:LINE `
* ADDED: commandline comes with improved --help
* ADDED: `:lt.objs.editor/load-addon` behavior loads CodeMirror addons that [ship with LT](https://github.com/LightTable/LightTable/tree/master/deploy/core/node_modules/codemirror/addon)
* ADDED: `:lt.objs.editor/set-rulers` behavior to set CodeMirror rulers - [screenshot](https://www.dropbox.com/s/ipq7c21w1dkwmg3/Screenshot%202015-01-24%2011.50.25.png?dl=0)
* ADDED: Add file-type definitions for .feature, .rst and [many more](https://github.com/LightTable/LightTable/commit/a12dc47d78825897b9a7bdcfafa72525eb4949f7)
* ADDED: Add F-11 keybinding for fullscreen
* ADDED: Add pmeta-/ for toggle-comment
* ADDED: Better error handling for download errors
* ADDED: Block comment command
* ADDED: Max length for autocompletion is configurable
* ADDED: Plugins and settings menu items

##0.7.2

* FIX: Behavior ordering issue that caused plugin weirdness and menus disappearing (ibdknox)
Expand Down
2 changes: 1 addition & 1 deletion deploy/core/version.json
@@ -1 +1 @@
{"version":"0.7.2","electron":"0.31.1"}
{"version":"0.8.0","electron":"0.34.5"}
2 changes: 1 addition & 1 deletion deploy/electron/Gruntfile.js
Expand Up @@ -4,7 +4,7 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-electron": {
version: "0.31.1",
version: "0.34.5",
outputDir: "./electron",
rebuild: true
}
Expand Down
1 change: 1 addition & 0 deletions deploy/settings/default/default.behaviors
Expand Up @@ -399,6 +399,7 @@
[:hinter :lt.plugins.auto-complete/escape!]
[:hinter :lt.plugins.auto-complete/select-unknown]
[:hinter :lt.plugins.auto-complete/line-change]
[:hinter :lt.plugins.auto-complete/set-hint-limit 1000]

[:inline.doc :lt.plugins.doc/clear]

Expand Down
57 changes: 57 additions & 0 deletions doc/behavior-and-keymap-configuration.md
@@ -0,0 +1,57 @@
This document assumes [the user.keymap
introduction](../deploy/core/User/user.keymap) and [the user.behaviors
introduction](../deploy/core/User/user.behaviors) have been read.

## Introduction

Keymap and behaviors files are ClojureScript data that when merged together
create LightTable's final keys and functionality. A user can add or remove any
keybinding/behavior. This is powerful as any default keybinding/behavior,
whether from LightTable or a plugin, can be removed or overridden by a user.
Next this document will cover configuring behaviors and keybindings through
tags, keys and commands.

## Tags

Tags allow keybindings/behaviors to apply in different contexts i.e. `enter`
means something different in a url bar vs a popup. Under the hood, objects have
tags added and removed which makes a keybinding/behavior apply or not apply to
them respectively. Tags can have optional extensions that make them apply in
different contexts. For example to have the `:editor` tag only apply to a file
for a given filetype use the format `:editor.FILETYPE` e.g.
`:editor.javascript`. Note that for the same keybinding/behavior a tag with
an extension takes precedence over one without.

There are a number of tags that only apply in a unique UI context or widget e.g.
a browser. Here are some common ones:

* :browser - Applies when inside a browser tab
* :editor.keys.hinting.active - Applies when hinting/autocomplete is active
* :filter-list.input - Applies when in a filter-list e.g. Commands pane or Navigator

For more tags see the ones used by default in
[default.keymap](../deploy/settings/default/default.keymap) and
[default.behaviors](../deploy/settings/default/default.behaviors) and search
LightTable for when a context tag is added with
[ctx/in!](https://github.com/LightTable/LightTable/search?utf8=%E2%9C%93&q=%22ctx%2Fin%21%22&type=Code).

## Keys

LightTable uses [mousetrap](https://github.com/ccampbell/mousetrap) for keyboard
handling. Mousetrap recognizes the following modifier keys: `shift, ctrl,
alt/option and command/cmd`. LightTable also recognizes pmeta which is
command/cmd in OSX and ctrl anywhere else. To specify other special keys like
'enter' see [this Mousetrap documentation](https://craig.is/killing/mice#keys).
LightTable also supports key combinations/sequences when keys are separated by a
space. This allows plugins like Emacs to support key chords like 'ctrl-x u'.

## Commands In Keybindings

Keybindings can run multiple commands by appending them to the end e.g. `[:TAG
"KEYS" :COMMAND1 :COMMAND2]`. While commands are started serially, there isn't a
guarantee that one command is fully finished before the next proceeds. Any
commands that have asynchronous functionality e.g. interaction with a network or
filesystem cannot guarantee when their functionality is complete. Commands can
have arguments passed to them by wrapping them in parenthesis e.g. `(:COMMAND
ARG1 ARG2)`. For example `[:tabs "pmeta-1" (:tabs.goto 0)]` is a default
keybinding that passes `0` as an argument to the `:tabs.goto` command.
2 changes: 1 addition & 1 deletion doc/developer-install.md
Expand Up @@ -3,7 +3,7 @@
## Prerequisites

- [Leiningen 2.x](http://leiningen.org/)
- [io.js and npm](https://iojs.org/). To avoid clobbering an existing node install, [use nvm](https://github.com/creationix/nvm).
- [node.js and npm](https://nodejs.org/)

## OS Specific Prerequisites

Expand Down
35 changes: 34 additions & 1 deletion doc/for-committers.md
Expand Up @@ -13,7 +13,7 @@ Current ClojureScript version and libraries we use are in [project.clj](https://

### Node packages

Node package installs last done with io.js v2.5.0 and npm v2.13.2.
Node package installs last done with node.js v2.5.0 and npm v2.13.2.

Node dependencies are at deploy/core/node\_modules/. This directory is currently a mix of vendored
dependencies, forked dependencies and Light Table specific libraries:
Expand Down Expand Up @@ -44,3 +44,36 @@ be unused. Some tips to confirm how it is/was used:

* Do a LightTable user search for the given fn. For example, to see where [proc/exec is used](https://github.com/search?utf8=%E2%9C%93&q=proc%2Fexec+user%3ALightTable&type=Code&ref=searchresults)
* `git log -u -S WORD` will do a code history search for WORD

## Release process

This is our release checklist which can be dropped in to an issue:

- [ ] Release 0.X.X
- [ ] Version updates
- [ ] Update deploy/core/package.json, deploy/core/version.json and project.clj (including the Codox `:source-uri` value) to 0.X.X
- [ ] Make sure electron version is up to date in version.json
- [ ] Make sure plugin versions in script/build-app.sh are latest versions
- [ ] Add changelog for release to CHANGELOG.md
- [ ] Each core developer should QA at least one OS using the [QA checklist](https://github.com/LightTable/LightTable/wiki/QA-Checklist)
- [ ] When QA passes freeze master
- [ ] Add changelog to [GH release draft](https://github.com/LightTable/LightTable/releases/new)
- [ ] Upload binaries from `script/build.sh --release` to draft. Don't forget to click *Save draft*!
- [ ] Generate an MD5 checksum for the binary package:
- [ ] Run `certUtil -hashfile lighttable-x.y.z-windows.zip MD5` on Windows.
- [ ] Run `openssl md5 lighttable-x.y.z-mac.tar.gz` on Mac OS X or Linux.
- [ ] Publish GH release which creates git tag and notifies users about new release
- [ ] Update download links on lighttable.com
- [ ] Mailing list announcement - [example email](https://gist.github.com/cldwalker/3d67153fe1eade2ae3cf)
- [ ] Optional blog post if a major release
- [ ] After release, [build api documentation](#build-api-documentation)

## Build api documentation

To build api documentation for current LT version and publish generated docs:

1. In project.clj make sure that `[:codox :source-uri]` points to current LT version.
This step will be removed once [there is upstream support for version in :source-uri](https://github.com/weavejester/codox/issues/107)
2. Run `script/build-api-docs.sh` on a clean git state. Make sure there are no pending git changes as this script will change git branches and push generated api docs to gh-pages.

Expect to see a ton of warnings e.g. `WARNING: Use of undeclared Var cljs.core/seq at line 197`. This will be noise we have to live with until we upgrade ClojureScript.
20 changes: 18 additions & 2 deletions project.clj
@@ -1,5 +1,5 @@
(defproject lighttable "0.8.0"
:description "Light Table is a new interactive IDE that lets you modify running programs and embed anything from websites to games. It provides the real time feedback we need to not only answer questions about our code, but to understand how our programs really work."
:description "Light Table is a next generation code editor that connects you to your creation with instant feedback. Light Table is very customizable and can display anything a Chromium browser can."
:url "http://www.lighttable.com/"
:dependencies [[org.clojure/clojure "1.5.1"]
[crate "0.2.5"]
Expand All @@ -22,6 +22,22 @@
:output-to "deploy/core/node_modules/clojurescript/cljsDeps.js"
:output-dir "deploy/core/node_modules/clojurescript/cljsDeps/"
:pretty-print true }}]}
:plugins [[lein-cljsbuild "1.0.1"]]

;; TODO: Remove separate :doc :dependencies after ClojureScript upgrade
:profiles {:doc {:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.145"
:exclusions [org.apache.ant/ant]]]}}
:plugins [[lein-cljsbuild "1.0.1"]
[lein-codox "0.9.0"]]
:codox {:language :clojurescript
:project {:name "LightTable"}
:output-path "codox"
:doc-paths [] ;; Disable including doc/
:namespaces [lt.macros lt.object lt.objs.command lt.objs.editor
lt.objs.editor.pool lt.objs.files lt.objs.notifos]
;; :source-uri version needs to be bumped per release until codox supports {version}
:source-uri "https://github.com/LightTable/LightTable/blob/0.8.0/{filepath}#L{line}"
;; Be explicit that undocumented public fns should be documented
:metadata {:doc "TODO: Add docstring"}}
:source-paths ["src/"]
)
16 changes: 16 additions & 0 deletions script/build-api-docs.sh
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e

# Build codox api docs and publish it on gh-pages branch

lein with-profile doc codox

git checkout gh-pages

rm -rf api/
mv codox api

git add api
git commit -m "Build api docs using script/build-api-docs.sh"
git push origin gh-pages:gh-pages
git checkout -

0 comments on commit 64d6d32

Please sign in to comment.