├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── grammars ├── noweb_julia.cson ├── noweb_python.cson ├── pweave_md.cson ├── pweave_rst.cson ├── pweave_tex.cson ├── weave_md.cson ├── weave_rst.cson └── weave_tex.cson ├── keymaps └── language-weave.cson ├── lib ├── html-preview.js └── main.js ├── menus └── language-weave.cson ├── package-lock.json ├── package.json ├── settings └── language-weave.cson └── snippets └── language-weave.cson /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | node_modules 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | # 0.2.4 3 | - Small fixes to highlighting 4 | 5 | # 0.2.3 6 | - Add syntax highlighting for markdown delimiters and chunk options 7 | 8 | # 0.2.2 9 | - Add syntax highlighting for noweb delimiters and chunk options 10 | 11 | # 0.2.1 12 | - Fix package json 13 | 14 | # 0.2.0 15 | - Support LaTex with noweb 16 | 17 | # 0.1.0 18 | - Support for markdown formats for Pweave and Weave.jl 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Matti Pastell 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Atom support Weave.jl and Pweave 2 | 3 | Atom syntax highlighting for [Weave.jl](http://weavejl.mpastell.com) and 4 | [Pweave](http://mpastell.com/pweave) documents. 5 | 6 | Provides the following modes: 7 | - `Weave.jl: markdown` for .jmd, .mdw and .jmdw (markdown with noweb) 8 | - `Weave.jl: LaTex` for texw, .jtexw and .jnw. 9 | - `Weave.jl: reStructuredText` for .jrstw 10 | - `Pweave: markdown` for .pmd and .pmdw (markdown with noweb) 11 | - `Pweave: LaTex` for .ptexw and .pnw 12 | - `Pweave: reStructuredText` for .prstw and .rstw 13 | 14 | If you need support for other formats open as issue or make a pull request. 15 | 16 | ![Juno integration image](https://user-images.githubusercontent.com/40514306/76081328-32f41900-5fec-11ea-958a-375f77f642a2.png) 17 | 18 | ## Run code using Hydrogen 19 | 20 | [Hydrogen](https://github.com/nteract/hydrogen) supports running code from Pweave and Weave code chunks using 21 | its [rich multi language document](https://blog.nteract.io/hydrogen-introducing-rich-multi-language-documents-b5057ff34efc) 22 | -feature. 23 | 24 | For Python you simply need to install Hydrogen and you can use hydrogen keybindings to run code e.g `ctrl-enter` to run a line and `ctrl-alt-enter` to run entire chunk. 25 | 26 | For Julia you need to add the following to `.atom/keymap.cson` if you want to use Hydrogen instead of Juno: 27 | 28 | ```coffee 29 | '.platform-linux .item-views > atom-text-editor[data-grammar="source weave md"], 30 | .platform-linux .item-views > atom-text-editor[data-grammar="source weave latex"], 31 | .platform-win32 .item-views > atom-text-editor[data-grammar="source weave md"], 32 | .platform-win32 .item-views > atom-text-editor[data-grammar="source weave latex"]': 33 | 'ctrl-enter': 'hydrogen:run' 34 | 'shift-enter': 'hydrogen:run-and-move-down' 35 | 36 | '.platform-darwin .item-views > atom-text-editor[data-grammar="source weave md"], 37 | .platform-darwin .item-views > atom-text-editor[data-grammar="source weave latex"]': 38 | 'cmd-enter': 'hydrogen:run' 39 | 'shift-enter': 'hydrogen:run-and-move-down' 40 | ``` 41 | 42 | 43 | ## Run Julia code using Juno 44 | 45 | If you have installed [Juno](http://junolab.org/), running code from Weave.jl documents works using `ctrl-enter` and `shift-enter` keybindings. 46 | -------------------------------------------------------------------------------- /grammars/noweb_julia.cson: -------------------------------------------------------------------------------- 1 | #Noweb for Julia 2 | 3 | scopeName: 'source.weave.noweb' 4 | patterns: [ 5 | { 6 | 'begin': '(^<<)(.*?)(>>=)\\s*$' 7 | 'beginCaptures': 8 | '1': 9 | 'name': 'markup.heading.weave.noweb' 10 | '2': 11 | 'contentName': 'source.embedded.julia' 12 | 'patterns': [ 13 | { 14 | 'include': 'source.julia' 15 | } 16 | ] 17 | '3': 18 | 'name' : 'markup.heading.weave.noweb' 19 | 'end': '^(@)\\s*$' 20 | 'endCaptures': 21 | '1': 22 | 'name': 'markup.heading.weave.noweb' 23 | 'contentName': 'source.embedded.julia' 24 | 'patterns': [ 25 | { 26 | 'include': 'source.julia' 27 | } 28 | ] 29 | } 30 | ] 31 | -------------------------------------------------------------------------------- /grammars/noweb_python.cson: -------------------------------------------------------------------------------- 1 | #Noweb for Python 2 | scopeName: 'source.pweave.noweb' 3 | patterns: [ 4 | { 5 | 'begin': '(^<<)(.*?)(>>=)\\s*$' 6 | 'beginCaptures': 7 | '1': 8 | 'name': 'markup.heading.pweave.noweb' 9 | '2': 10 | 'contentName': 'source.embedded.python' 11 | 'patterns': [ 12 | { 13 | 'include': 'source.python' 14 | } 15 | ] 16 | '3': 17 | 'name' : 'markup.heading.pweave.noweb' 18 | 'end': '^(@)\\s*$' 19 | 'endCaptures': 20 | '1': 21 | 'name': 'markup.heading.pweave.noweb' 22 | 'contentName': 'source.embedded.python' 23 | 'patterns': [ 24 | { 25 | 'include': 'source.python' 26 | } 27 | ] 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /grammars/pweave_md.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Pweave markdown' 2 | scopeName: 'source.pweave.md' 3 | 'fileTypes': [ 4 | 'pmd' 5 | 'pmdw' 6 | ] 7 | patterns: [ 8 | { 9 | 'include' : 'source.pweave.noweb' 10 | } 11 | { 12 | 'begin': '^([`~]{3,})(\\{|\\{\\.|)(python)(,|)\\s*(.*?)(\\}|)\\s*$' 13 | 'beginCaptures': 14 | '1': 15 | 'name': 'markup.heading.weave.md' 16 | '3': 17 | 'name': 'markup.bold.weave.md' 18 | '5': 19 | 'contentName' : 'source.embedded.python' 20 | 'patterns': [ 21 | { 22 | 'include': 'source.python' 23 | } 24 | ] 25 | 'end': '^[`~]{3,}\\s*$' 26 | 'endCaptures': 27 | '0': 28 | 'name': 'markup.heading.weave.md' 29 | 'contentName': 'source.embedded.python' 30 | 'patterns': [ 31 | { 32 | 'include': 'source.python' 33 | } 34 | ] 35 | } 36 | { 37 | 'begin': '\\<\\%=?' 38 | 'beginCaptures': 39 | '0': 40 | 'name': 'markup.bold.weave.md' 41 | 'end': '\\%\\>' 42 | 'endCaptures': 43 | '0': 44 | 'name': 'markup.bold.weave.md' 45 | 'contentName': 'source.embedded.python' 46 | 'patterns': [ 47 | { 48 | 'include': 'source.python' 49 | } 50 | ] 51 | } 52 | { 53 | 'include': 'text.md' 54 | } 55 | { 56 | 'include': 'source.gfm' 57 | } 58 | 59 | ] 60 | -------------------------------------------------------------------------------- /grammars/pweave_rst.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Pweave reStructuredText' 2 | scopeName: 'source.pweave.restructuredtext' 3 | 'fileTypes': [ 4 | 'prstw' 5 | 'rstw' 6 | ] 7 | patterns: [ 8 | { 9 | 'include' : 'source.pweave.noweb' 10 | } 11 | { 12 | 'include': 'text.restructuredtext' 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /grammars/pweave_tex.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Pweave LaTex' 2 | scopeName: 'source.pweave.latex' 3 | 'fileTypes': [ 4 | 'ptexw' 5 | 'pnw' 6 | ] 7 | patterns: [ 8 | { 9 | 'include' : 'source.pweave.noweb' 10 | } 11 | { 12 | 'include': 'text.tex.latex' 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /grammars/weave_md.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Weave.jl markdown' 2 | 'scopeName' : 'source.weave.md' 3 | 'fileTypes': [ 4 | 'jmd' 5 | 'jmdw' 6 | 'mdw' 7 | ] 8 | 'patterns': [ 9 | { 10 | 'include' : 'source.weave.noweb' 11 | } 12 | { 13 | 'begin': '^([`~]{3,})(?:(?:(?:\\{|\\{\\.|)(julia|jldoctest)(?:;|))|(@(docs|autodocs|ref|meta|index|content|example|repl|eval|setup|raw)))\\s*(?:.*?)(\\}|)\\s*$' 14 | 'beginCaptures': 15 | '1': 16 | 'name': 'markup.heading.weave.md' 17 | '2': 18 | 'name': 'markup.bold.weave.md' 19 | '3': 20 | 'name': 'markup.bold.weave.md' 21 | '4': 22 | 'contentName' : 'source.embedded.julia' 23 | 'patterns': [ 24 | { 25 | 'include': 'source.julia' 26 | } 27 | ] 28 | 'end': '^[`~]{3,}\\s*$' 29 | 'endCaptures': 30 | '0': 31 | 'name': 'markup.heading.weave.md' 32 | 'contentName': 'source.embedded.julia' 33 | 'patterns': [ 34 | { 35 | 'include': 'source.julia' 36 | } 37 | ] 38 | } 39 | { 40 | 'begin' : '^(!)\\s(.*)' 41 | 'beginCaptures': 42 | '1' : 43 | 'name' : 'markup.bold.weave.md' 44 | '2': 45 | 'contentName': 'source.embedded.julia' 46 | 'patterns' : [ 47 | { 48 | 'include': 'source.julia' 49 | } 50 | ] 51 | 'end' : '$' 52 | } 53 | { 54 | 'include': 'text.md' 55 | } 56 | { 57 | 'include': 'source.gfm' 58 | } 59 | ] 60 | -------------------------------------------------------------------------------- /grammars/weave_rst.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Weave.jl reStructuredText' 2 | scopeName: 'source.weave.restructuredtext' 3 | 'fileTypes': [ 4 | 'jrstw' 5 | ] 6 | patterns: [ 7 | { 8 | 'include' : 'source.weave.noweb' 9 | } 10 | { 11 | 'include': 'text.restructuredtext' 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /grammars/weave_tex.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Weave.jl LaTex' 2 | scopeName: 'source.weave.latex' 3 | 'fileTypes': [ 4 | 'texw' 5 | 'jtexw' 6 | 'jnw' 7 | ] 8 | patterns: [ 9 | { 10 | 'include' : 'source.weave.noweb' 11 | } 12 | { 13 | 'include': 'text.tex.latex' 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /keymaps/language-weave.cson: -------------------------------------------------------------------------------- 1 | '.platform-darwin atom-text-editor[data-grammar="source weave md"]': 2 | 'cmd-shift-x': 'weave:toggle-task' 3 | '.platform-win32 atom-text-editor[data-grammar="source weave md"]': 4 | 'ctrl-shift-x': 'weave:toggle-task' 5 | '.platform-linux atom-text-editor[data-grammar="source weave md"]': 6 | 'ctrl-shift-x': 'weave:toggle-task' 7 | 8 | '.platform-darwin atom-text-editor[data-grammar="source pweave md"]': 9 | 'cmd-shift-x': 'weave:toggle-task' 10 | '.platform-win32 atom-text-editor[data-grammar="source pweave md"]': 11 | 'ctrl-shift-x': 'weave:toggle-task' 12 | '.platform-linux atom-text-editor[data-grammar="source pweave md"]': 13 | 'ctrl-shift-x': 'weave:toggle-task' 14 | 15 | '.platform-linux .item-views > atom-text-editor[data-grammar="source weave md"], 16 | .platform-linux .item-views > atom-text-editor[data-grammar="source weave latex"], 17 | .platform-win32 .item-views > atom-text-editor[data-grammar="source weave md"], 18 | .platform-win32 .item-views > atom-text-editor[data-grammar="source weave latex"]': 19 | 'ctrl-enter': 'julia-client:run-block' 20 | 'shift-enter': 'julia-client:run-and-move' 21 | 'ctrl-shift-enter': 'julia-client:run-all' 22 | 'alt-enter': 'julia-client:run-cell' 23 | 'alt-shift-enter': 'julia-client:run-cell-and-move' 24 | 'alt-down': 'julia-client:next-cell' 25 | 'alt-up': 'julia-client:prev-cell' 26 | 'ctrl-j ctrl-d': 'julia-client:show-documentation' 27 | 'ctrl-j ctrl-g': 'julia-client:goto-symbol' 28 | 29 | '.platform-darwin .item-views > atom-text-editor[data-grammar="source weave md"], 30 | .platform-darwin .item-views > atom-text-editor[data-grammar="source weave latex"]': 31 | 'cmd-enter': 'julia-client:run-block' 32 | 'shift-enter': 'julia-client:run-and-move' 33 | 'cmd-shift-enter': 'julia-client:run-all' 34 | 'alt-enter': 'julia-client:run-cell' 35 | 'alt-shift-enter': 'julia-client:run-cell-and-move' 36 | 'alt-down': 'julia-client:next-cell' 37 | 'alt-up': 'julia-client:prev-cell' 38 | 'cmd-j cmd-d': 'julia-client:show-documentation' 39 | 'cmd-j cmd-g': 'julia-client:goto-symbol' 40 | -------------------------------------------------------------------------------- /lib/html-preview.js: -------------------------------------------------------------------------------- 1 | 'use babel' 2 | 3 | import { ScrollView } from 'atom-space-pen-views' 4 | import fs from 'fs-plus' 5 | import path from 'path' 6 | 7 | export default class HTMLPreview extends ScrollView { 8 | static content () { 9 | return this.div({class: 'html-view', tabindex: -1}, () => { 10 | this.div({outlet: 'container', style: 'width:100%;height:100%;background-color:white'}) 11 | }) 12 | } 13 | 14 | constructor (uri) { 15 | super() 16 | this.uri = uri 17 | this.filePath = uri.split('://')[1] 18 | this.isAttached = false 19 | this.id = Math.round(Math.random()*10**10) 20 | 21 | this.showDocument() 22 | this.watcher = this.keepUpdated() 23 | } 24 | 25 | showDocument () { 26 | this.webview = document.createElement('webview') 27 | this.webview.id = this.id 28 | this.webview.setAttribute('src', this.filePath) 29 | this.webview.setAttribute('style', 'width: 100%; height: 100%') 30 | this.container[0].appendChild(this.webview) 31 | this.isAttached = true 32 | } 33 | 34 | keepUpdated () { 35 | if (fs.existsSync(this.filePath)) { 36 | let watcher = fs.watch(this.filePath, {}, (eventType, filename) => { 37 | if (eventType === 'change') { 38 | this.reloadWebview() 39 | } else { 40 | watcher.close() 41 | } 42 | }) 43 | return watcher 44 | } 45 | } 46 | 47 | reloadWebview () { 48 | if (this.webview && this.isAttached && document.getElementById(`${this.id}`)) { 49 | this.webview.reloadIgnoringCache() 50 | } 51 | } 52 | 53 | serialize () { 54 | return { 55 | uri: this.uri, 56 | filePath: this.filePath, 57 | deserializer: 'HTMLPreviewDeserializer' 58 | } 59 | } 60 | 61 | getTitle() { 62 | if (this.filePath) { 63 | return 'Preview: ' + path.basename(this.filePath) 64 | } else { 65 | return 'untitled' 66 | } 67 | } 68 | 69 | getURI() { 70 | return this.uri 71 | } 72 | 73 | getPath() { 74 | return this.filePath 75 | } 76 | 77 | destroy() { 78 | if (this.watcher) { 79 | this.watcher.close() 80 | } 81 | return this.detach() 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/main.js: -------------------------------------------------------------------------------- 1 | 'use babel' 2 | import { CompositeDisposable } from 'atom' 3 | import path from 'path' 4 | 5 | let subs = null 6 | let toolbar = null 7 | let juliaClient = null 8 | let HTMLPreviewView = require('./html-preview.js') 9 | 10 | export function activate () { 11 | subs = new CompositeDisposable() 12 | 13 | subs.add(atom.workspace.addOpener((uri) => { 14 | if (path.extname(uri) === '.html' && uri.startsWith('preview://')) { 15 | return new HTMLPreviewView(uri) 16 | } 17 | })) 18 | 19 | subs.add(atom.commands.add( 20 | `atom-text-editor[data-grammar="source julia"], 21 | atom-text-editor[data-grammar="source weave md"], 22 | atom-text-editor[data-grammar="source weave latex"]`, 23 | 'weave:weave-to-pdf', () => weave('pdf') 24 | )) 25 | subs.add(atom.commands.add( 26 | `atom-text-editor[data-grammar="source julia"], 27 | atom-text-editor[data-grammar="source weave md"], 28 | atom-text-editor[data-grammar="source weave latex"]`, 29 | 'weave:weave-to-html', () => weave('html') 30 | )) 31 | } 32 | 33 | function weave(format) { 34 | if (juliaClient === null) { 35 | atom.notifications.addError("Juno not installed", { 36 | description: "[Juno](http://junolab.org/) needs to be installed to weave files." 37 | }) 38 | return 39 | } 40 | 41 | juliaClient.boot() 42 | 43 | const ed = atom.workspace.getActiveTextEditor() 44 | const pane = atom.workspace.getActivePane() 45 | if (!ed) { 46 | atom.notifications.addError("No editor selected", { 47 | description: "Select an editor to weave a file." 48 | }) 49 | return 50 | } 51 | let edpath = ed.getPath() 52 | if (!edpath) { 53 | atom.notifications.addError("File is not saved", { 54 | description: "Please save your file to weave it." 55 | }) 56 | return 57 | } 58 | 59 | ed.save() 60 | 61 | if (process.platform === 'win32') { 62 | edpath = edpath.replace(/\\/g, "/") 63 | } 64 | 65 | let weaveCommand = 'using Weave;' 66 | weaveCommand += 'try;' 67 | weaveCommand += `weave("${edpath}", doctype="md2${format}");` 68 | weaveCommand += 'catch err;' 69 | weaveCommand += '@error("Weaving failed.", error=err); 0;' 70 | weaveCommand += 'end' 71 | 72 | const evalsimple = juliaClient.import({rpc: ['evalsimple']}).evalsimple 73 | evalsimple(weaveCommand).then((res) => { 74 | if (!atom.config.get('language-weave.showPreview')) return 75 | 76 | if (res !== 0) { 77 | if (format == 'html') { 78 | outpath = 'preview://' + res 79 | } else { 80 | outpath = res 81 | } 82 | if ( 83 | format === 'pdf' && ( 84 | !atom.packages.isPackageActive('pdf-view') && 85 | !atom.packages.isPackageActive('pdf-view-plus') 86 | ) 87 | ) { 88 | atom.notifications.addError("Can't display PDF", { 89 | description: 'Please install the [pdf-view-plus](https://github.com/Aerijo/atom-pdf-view-plus) package.' 90 | }) 91 | return 92 | } 93 | atom.workspace.open(outpath, { 94 | searchAllPanes: true, 95 | split: 'right' 96 | }).then(() => { 97 | pane.activate() 98 | pane.activateItem(ed) 99 | }) 100 | } else { 101 | atom.notifications.addError("Weaving file failed", { 102 | description: "See the REPL for details." 103 | }) 104 | } 105 | }) 106 | } 107 | 108 | export function consumeJuliaClient (client) { 109 | juliaClient = client 110 | } 111 | 112 | export function consumeToolBar (getToolBar) { 113 | if (!atom.config.get('julia-client.uiOptions.enableToolBar')) return 114 | toolbar = getToolBar() 115 | toolbar.addSpacer() 116 | toolbar.addButton({ 117 | icon: 'logo-html5', 118 | iconset: 'ion', 119 | callback: 'weave:weave-to-html', 120 | tooltip: 'Weave HTML' 121 | }) 122 | toolbar.addButton({ 123 | icon: 'file-pdf', 124 | iconset: 'fa', 125 | callback: 'weave:weave-to-pdf', 126 | tooltip: 'Weave PDF' 127 | }) 128 | toolbar.addSpacer() 129 | } 130 | 131 | export var config = { 132 | showPreview: { 133 | type: 'boolean', 134 | default: true, 135 | title: 'Show Previews' 136 | } 137 | } 138 | 139 | export function deactivate () { 140 | if (toolbar) { 141 | toolbar.removeItems() 142 | toolbar = null 143 | } 144 | subs.dispose() 145 | } 146 | 147 | export function deserialize({filePath, uri}) { 148 | if (require('fs-plus').isFileSync(filePath)) { 149 | return new HTMLPreviewView(uri) 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /menus/language-weave.cson: -------------------------------------------------------------------------------- 1 | 'context-menu': 2 | 'atom-text-editor[data-grammar="source weave md"], 3 | atom-text-editor[data-grammar="source weave latex"]': [ 4 | {type: 'separator'} 5 | 6 | { 7 | label: 'Juno', 8 | submenu: [ 9 | {label: 'Run Block', command: 'julia-client:run-block'} 10 | {label: 'Select Block', command: 'julia-client:select-block'} 11 | {type: 'separator'} 12 | {label: 'Go to Definition', command: 'julia-client:goto-symbol'} 13 | {label: 'Show Documentation', command: 'julia-client:show-documentation'} 14 | {type: 'separator'} 15 | {label: 'Debug: Run Block', command: 'julia-debug:run-block'} 16 | {label: 'Debug: Step through Block', command: 'julia-debug:step-through-block'} 17 | {label: 'Toggle Breakpoint', command: 'julia-debug:toggle-breakpoint'} 18 | {label: 'Toggle Conditional Breakpoint', command: 'julia-debug:toggle-conditional-breakpoint'} 19 | ] 20 | } 21 | 22 | {type: 'separator'} 23 | ] 24 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-weave", 3 | "version": "0.7.2", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "async": { 8 | "version": "1.5.2", 9 | "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", 10 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" 11 | }, 12 | "atom-space-pen-views": { 13 | "version": "2.2.0", 14 | "resolved": "https://registry.npmjs.org/atom-space-pen-views/-/atom-space-pen-views-2.2.0.tgz", 15 | "integrity": "sha1-plsskg7QL3JAFPp9Plw9ePv1mZc=", 16 | "requires": { 17 | "fuzzaldrin": "^2.1.0", 18 | "space-pen": "^5.1.2" 19 | } 20 | }, 21 | "balanced-match": { 22 | "version": "1.0.0", 23 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 24 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 25 | }, 26 | "brace-expansion": { 27 | "version": "1.1.11", 28 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 29 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 30 | "requires": { 31 | "balanced-match": "^1.0.0", 32 | "concat-map": "0.0.1" 33 | } 34 | }, 35 | "concat-map": { 36 | "version": "0.0.1", 37 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 38 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 39 | }, 40 | "d": { 41 | "version": "0.1.1", 42 | "resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz", 43 | "integrity": "sha1-2hhMU10Y2O57oqoim5FACfrhEwk=", 44 | "requires": { 45 | "es5-ext": "~0.10.2" 46 | } 47 | }, 48 | "emissary": { 49 | "version": "1.3.3", 50 | "resolved": "https://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz", 51 | "integrity": "sha1-phjZLWgrIy0xER3DYlpd9mF5lgY=", 52 | "requires": { 53 | "es6-weak-map": "^0.1.2", 54 | "mixto": "1.x", 55 | "property-accessors": "^1.1", 56 | "underscore-plus": "1.x" 57 | } 58 | }, 59 | "es5-ext": { 60 | "version": "0.10.48", 61 | "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.48.tgz", 62 | "integrity": "sha512-CdRvPlX/24Mj5L4NVxTs4804sxiS2CjVprgCmrgoDkdmjdY4D+ySHa7K3jJf8R40dFg0tIm3z/dk326LrnuSGw==", 63 | "requires": { 64 | "es6-iterator": "~2.0.3", 65 | "es6-symbol": "~3.1.1", 66 | "next-tick": "1" 67 | }, 68 | "dependencies": { 69 | "d": { 70 | "version": "1.0.0", 71 | "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", 72 | "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", 73 | "requires": { 74 | "es5-ext": "^0.10.9" 75 | } 76 | }, 77 | "es6-iterator": { 78 | "version": "2.0.3", 79 | "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", 80 | "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", 81 | "requires": { 82 | "d": "1", 83 | "es5-ext": "^0.10.35", 84 | "es6-symbol": "^3.1.1" 85 | } 86 | }, 87 | "es6-symbol": { 88 | "version": "3.1.1", 89 | "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", 90 | "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", 91 | "requires": { 92 | "d": "1", 93 | "es5-ext": "~0.10.14" 94 | } 95 | } 96 | } 97 | }, 98 | "es6-iterator": { 99 | "version": "0.1.3", 100 | "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz", 101 | "integrity": "sha1-1vWLjE/EE8JJtLqhl2j45NfIlE4=", 102 | "requires": { 103 | "d": "~0.1.1", 104 | "es5-ext": "~0.10.5", 105 | "es6-symbol": "~2.0.1" 106 | } 107 | }, 108 | "es6-symbol": { 109 | "version": "2.0.1", 110 | "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", 111 | "integrity": "sha1-dhtcZ8/U8dGK+yNPaR1nhoLLO/M=", 112 | "requires": { 113 | "d": "~0.1.1", 114 | "es5-ext": "~0.10.5" 115 | } 116 | }, 117 | "es6-weak-map": { 118 | "version": "0.1.4", 119 | "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz", 120 | "integrity": "sha1-cGzvnpmqI2undmwjnIueKG6n0ig=", 121 | "requires": { 122 | "d": "~0.1.1", 123 | "es5-ext": "~0.10.6", 124 | "es6-iterator": "~0.1.3", 125 | "es6-symbol": "~2.0.1" 126 | } 127 | }, 128 | "fs-plus": { 129 | "version": "2.10.1", 130 | "resolved": "https://registry.npmjs.org/fs-plus/-/fs-plus-2.10.1.tgz", 131 | "integrity": "sha1-MgR4HXhAYR5jZOe2+wWMljJ8WqU=", 132 | "requires": { 133 | "async": "^1.5.2", 134 | "mkdirp": "^0.5.1", 135 | "rimraf": "^2.5.2", 136 | "underscore-plus": "1.x" 137 | } 138 | }, 139 | "fs.realpath": { 140 | "version": "1.0.0", 141 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 142 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 143 | }, 144 | "fuzzaldrin": { 145 | "version": "2.1.0", 146 | "resolved": "https://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-2.1.0.tgz", 147 | "integrity": "sha1-kCBMPi/appQbso0WZF1BgGOpDps=" 148 | }, 149 | "glob": { 150 | "version": "7.1.3", 151 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 152 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", 153 | "requires": { 154 | "fs.realpath": "^1.0.0", 155 | "inflight": "^1.0.4", 156 | "inherits": "2", 157 | "minimatch": "^3.0.4", 158 | "once": "^1.3.0", 159 | "path-is-absolute": "^1.0.0" 160 | } 161 | }, 162 | "grim": { 163 | "version": "1.5.0", 164 | "resolved": "https://registry.npmjs.org/grim/-/grim-1.5.0.tgz", 165 | "integrity": "sha1-sysI71Z88YUvgXWe2caLDXE5ajI=", 166 | "requires": { 167 | "emissary": "^1.2.0" 168 | } 169 | }, 170 | "inflight": { 171 | "version": "1.0.6", 172 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 173 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 174 | "requires": { 175 | "once": "^1.3.0", 176 | "wrappy": "1" 177 | } 178 | }, 179 | "inherits": { 180 | "version": "2.0.3", 181 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 182 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 183 | }, 184 | "jquery": { 185 | "version": "2.1.4", 186 | "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.1.4.tgz", 187 | "integrity": "sha1-IoveaYoMYUMdwmMKahVPFYkNIxc=" 188 | }, 189 | "minimatch": { 190 | "version": "3.0.4", 191 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 192 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 193 | "requires": { 194 | "brace-expansion": "^1.1.7" 195 | } 196 | }, 197 | "minimist": { 198 | "version": "0.0.8", 199 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 200 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" 201 | }, 202 | "mixto": { 203 | "version": "1.0.0", 204 | "resolved": "https://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz", 205 | "integrity": "sha1-wyDvYbUvKJj1IuF9i7xtUG2EJbY=" 206 | }, 207 | "mkdirp": { 208 | "version": "0.5.1", 209 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 210 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 211 | "requires": { 212 | "minimist": "0.0.8" 213 | } 214 | }, 215 | "next-tick": { 216 | "version": "1.0.0", 217 | "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", 218 | "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" 219 | }, 220 | "once": { 221 | "version": "1.4.0", 222 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 223 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 224 | "requires": { 225 | "wrappy": "1" 226 | } 227 | }, 228 | "path-is-absolute": { 229 | "version": "1.0.1", 230 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 231 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 232 | }, 233 | "property-accessors": { 234 | "version": "1.1.3", 235 | "resolved": "https://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz", 236 | "integrity": "sha1-Hd6EAkYxhlkJ7zBwM2VoDF+SixU=", 237 | "requires": { 238 | "es6-weak-map": "^0.1.2", 239 | "mixto": "1.x" 240 | } 241 | }, 242 | "rimraf": { 243 | "version": "2.6.3", 244 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 245 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 246 | "requires": { 247 | "glob": "^7.1.3" 248 | } 249 | }, 250 | "space-pen": { 251 | "version": "5.1.2", 252 | "resolved": "https://registry.npmjs.org/space-pen/-/space-pen-5.1.2.tgz", 253 | "integrity": "sha1-Ivu+EOCwROe3pHsCPamdlLWE748=", 254 | "requires": { 255 | "grim": "^1.0.0", 256 | "jquery": "2.1.4", 257 | "underscore-plus": "1.x" 258 | } 259 | }, 260 | "underscore": { 261 | "version": "1.8.3", 262 | "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", 263 | "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" 264 | }, 265 | "underscore-plus": { 266 | "version": "1.6.8", 267 | "resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.6.8.tgz", 268 | "integrity": "sha512-88PrCeMKeAAC1L4xjSiiZ3Fg6kZOYrLpLGVPPeqKq/662DfQe/KTSKdSR/Q/tucKNnfW2MNAUGSCkDf8HmXC5Q==", 269 | "requires": { 270 | "underscore": "~1.8.3" 271 | } 272 | }, 273 | "wrappy": { 274 | "version": "1.0.2", 275 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 276 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 277 | } 278 | } 279 | } 280 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-weave", 3 | "version": "0.7.2", 4 | "description": "Support for Weave.jl and Pweave", 5 | "license": "MIT", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/JunoLab/language-weave.git" 9 | }, 10 | "engines": { 11 | "atom": "*" 12 | }, 13 | "bugs": { 14 | "url": "https://github.com/JunoLab/language-weave/issues" 15 | }, 16 | "homepage": "https://github.com/JunoLab/language-weave", 17 | "main": "lib/main.js", 18 | "extensions": { 19 | ".json": [ 20 | "package.json" 21 | ] 22 | }, 23 | "dependencies": { 24 | "fs-plus": "2.x", 25 | "atom-space-pen-views": "^2.0.3" 26 | }, 27 | "deserializers": { 28 | "HTMLPreviewDeserializer": "deserialize" 29 | }, 30 | "consumedServices": { 31 | "julia-client": { 32 | "versions": { 33 | "0.1.0": "consumeJuliaClient" 34 | } 35 | }, 36 | "tool-bar": { 37 | "versions": { 38 | "^0 || ^1": "consumeToolBar" 39 | } 40 | } 41 | }, 42 | "folders": [] 43 | } 44 | -------------------------------------------------------------------------------- /settings/language-weave.cson: -------------------------------------------------------------------------------- 1 | '.source.weave': 2 | 'editor': 3 | 'softWrap': false 4 | '.source.weave.md:not(.code)': 5 | editor: 6 | commentStart: '' 8 | '.source.pweave.md:not(.code)': 9 | editor: 10 | commentStart: '' 12 | -------------------------------------------------------------------------------- /snippets/language-weave.cson: -------------------------------------------------------------------------------- 1 | '.source.weave.md': 2 | 'Julia code chunk': 3 | 'prefix': 'julia' 4 | 'body': """ 5 | ```julia 6 | $1 7 | ``` 8 | """ 9 | 10 | --------------------------------------------------------------------------------