Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bamboo/mighttable

Metascript plugin for LightTable
https://github.com/bamboo/mighttable

Last synced: 10 days ago
JSON representation

Metascript plugin for LightTable

Awesome Lists containing this project

README

        

# MightTable

Metascript plugin for LightTable

# Installation

Install using the plugin manager.

# Hacking

* Clone the project into LightTable plugins directory
```
cd ~/.config/LightTable/Plugins
git clone [email protected]:bamboo/MightTable.git
cd MightTable
```
* If you need a more recent metascript compiler, bump the dependency version number in the project.clj file and install it with
```
lein npm install
```
* Open src/lt/plugins/metascript.cljs in LightTable and execute the command "Editor: build file or project"

# Usage

## Evaluating Expressions

Ctrl-Enter evaluates top level expressions.

Ctrl-Shift-Enter evaluates the whole file.

### Connecting to a node client

Open your metascript file and execute "Add Connection", select "NodeJS" and browse to a regular javascript file in your node project folder. Any file will do (including the one generated by the metascript compiler). I suggest to keep a file with the following code together with your metascript files:

```javascript
console.log('connected!');
```

If you're going to connect to multiple node clients at the same time each startup file in each project must have a different name.

## Jumping to errors

The plugin provides the commands *:metascript.jump-to-next-error* and *:metascript.jump-to-previous-error* for quick error navigation.

For convenience add the following to your *user.keymap*:

```Clojure
:editor.metascript {"alt-pagedown" [:metascript.jump-to-next-error]
"alt-pageup" [:metascript.jump-to-previous-error]}
```

The commands use the *jump-stack* which means you can jump back with the usual Ctrl-, shortcut.

## Code Folding

In addition to the regular *:editor.fold-code* command, the plugin also supports the commands *:metascript.fold-all* and *:metascript.unfold-all*:

```Clojure
:editor.metascript {"alt-=" [:metascript.fold-all]
"alt-shift-=" [:metascript.unfold-all]}
```

# TODO

* use compiled js path with node client

* original error location
* if there's an original location display icon to jump to that location
* to test write a macro that produces wrong code (coming from quoted code)

* error pad
* show all errors