├── eel2 ├── .gitignore ├── .vscodeignore ├── .gitattributes ├── CHANGELOG.md ├── .vscode │ └── launch.json ├── package.json ├── language-configuration.json ├── README.md └── syntaxes │ └── eel2.tmLanguage.json ├── walter ├── .gitignore ├── .vscodeignore ├── .gitattributes ├── CHANGELOG.md ├── README.md ├── .vscode │ └── launch.json ├── package.json ├── language-configuration.json └── syntaxes │ └── walter.tmLanguage.json ├── snippets ├── reaper-api │ └── README.md ├── README.md └── lokasenna │ ├── README.md │ └── lokasenna.code-snippets ├── .github └── CODEOWNERS └── README.md /eel2/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix -------------------------------------------------------------------------------- /walter/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix -------------------------------------------------------------------------------- /eel2/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /walter/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /eel2/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behavior to automatically normalize line endings. 2 | * text=auto 3 | 4 | -------------------------------------------------------------------------------- /walter/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behavior to automatically normalize line endings. 2 | * text=auto 3 | 4 | -------------------------------------------------------------------------------- /snippets/reaper-api/README.md: -------------------------------------------------------------------------------- 1 | # Reaper API snippets 2 | 3 | All of the functions provided in the Reaper API documentation (i.e. _reaper._, _gfx._, functions from the SWS extension, etc.) -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' are comments. 2 | # Each line is a file pattern followed by one or more owners. 3 | 4 | # These owners will be the default owners for everything in the repo. 5 | * @jalovatt -------------------------------------------------------------------------------- /walter/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to the "walter" extension will be documented in this file. 3 | 4 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 5 | 6 | ## [Unreleased] 7 | - Initial release -------------------------------------------------------------------------------- /eel2/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to the "eel2-for-reaper" extension will be documented in this file. 3 | 4 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 5 | 6 | ## [Unreleased] 7 | - Initial release -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reaper tools for Visual Studio Code 2 | 3 | (I'll give this a better writeup at some point) 4 | 5 | This project provides various tools and extensions for Visual Studio Code to assist in writing Reaper scripts. 6 | 7 | See the _README.md_ in each folder for installation instructions. -------------------------------------------------------------------------------- /snippets/README.md: -------------------------------------------------------------------------------- 1 | # ReaScript code snippets 2 | 3 | This folder provides auto-complete snippets for ReaScripts in a variety of languages. 4 | 5 | ## Installation 6 | Download a _.code-snippets_ file and place it in Code's _snippets_ folder: 7 | - Windows _%USERPROFILE%\AppData\Roaming\Code\User\snippets_ 8 | - MacOS _Not sure_ 9 | - Linux _Not sure_ 10 | 11 | Code should automatically detect it (might require a restart) and start offering suggestions when you type in a file using the appropriate language. -------------------------------------------------------------------------------- /walter/README.md: -------------------------------------------------------------------------------- 1 | # Walter Language Support 2 | 3 | This folder provides a Walter language definition for Visual Studio Code. Language definitions are required to associate code snippets with a particular language/file format, and to provide appropriate syntax highlighting. 4 | 5 | ## Installation 6 | Clone/download this folder's contents to the following path: 7 | - Windows _%USERPROFILE%\.vscode\extensions_ 8 | - MacOS _~/.vscode/extensions_ 9 | - Linux _~/.vscode/extensions_ 10 | 11 | Code should now automatically detect _rtconfig.txt_ files as Walter (for standard installations, languages are displayed in the bottom-right corner on the status bar). -------------------------------------------------------------------------------- /eel2/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /snippets/lokasenna/README.md: -------------------------------------------------------------------------------- 1 | # Lokasenna's Lua snippets 2 | 3 | Nothing particularly impressive at the moment; just a few things I have to type out in almost every script I write. 4 | 5 | ### msg 6 | The standard wrapper for ```reaper.ShowConsoleMsg``` that most of us use. 7 | 8 | ### dmsg 9 | The same, but with a global flag (```dm = true```) to determine if messages will be printed or not. Useful if you want to leave your debug messages in a released script without necessarily printing them on the end-user's screen. 10 | 11 | ### reapack 12 | A blank ReaPack header. 13 | 14 | ### head 15 | A simple ASCII block to use for headings in comments, just for better visual separation. -------------------------------------------------------------------------------- /walter/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /eel2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eel2", 3 | "displayName": "EEL2 for Reaper", 4 | "description": "Support for the EEL2 language used in Reaper scripts", 5 | "version": "0.0.1", 6 | "publisher": "n", 7 | "engines": { 8 | "vscode": "^1.24.0" 9 | }, 10 | "categories": [ 11 | "Programming Languages" 12 | ], 13 | "contributes": { 14 | "languages": [{ 15 | "id": "eel2", 16 | "aliases": ["EEL2", "eel2"], 17 | "extensions": [".eel",".jsfx"], 18 | "configuration": "./language-configuration.json" 19 | }], 20 | "grammars": [{ 21 | "language": "eel2", 22 | "scopeName": "source.eel", 23 | "path": "./syntaxes/eel2.tmLanguage.json" 24 | }] 25 | } 26 | } -------------------------------------------------------------------------------- /walter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "walter", 3 | "displayName": "Walter", 4 | "description": "Support for Walter, Reaper's theming language.", 5 | "version": "0.0.1", 6 | "publisher": "n", 7 | "engines": { 8 | "vscode": "^1.24.0" 9 | }, 10 | "categories": [ 11 | "Programming Languages" 12 | ], 13 | "contributes": { 14 | "languages": [{ 15 | "id": "walter", 16 | "aliases": ["Walter", "walter"], 17 | "extensions": ["rtconfig.txt"], 18 | "configuration": "./language-configuration.json" 19 | }], 20 | "grammars": [{ 21 | "language": "walter", 22 | "scopeName": "source.walter", 23 | "path": "./syntaxes/walter.tmLanguage.json" 24 | }] 25 | } 26 | } -------------------------------------------------------------------------------- /eel2/language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": "//", 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | "blockComment": [ "/*", "*/" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"] 21 | ], 22 | // symbols that that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["(", ")"], 27 | ["\"", "\""], 28 | ["'", "'"] 29 | ] 30 | } -------------------------------------------------------------------------------- /walter/language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": "//", 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | "blockComment": [ "/*", "*/" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"] 21 | ], 22 | // symbols that that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["(", ")"], 27 | ["\"", "\""], 28 | ["'", "'"] 29 | ] 30 | } -------------------------------------------------------------------------------- /eel2/README.md: -------------------------------------------------------------------------------- 1 | # EEL2 Language Support 2 | 3 | This folder provides an EEL2 language definition for Visual Studio Code. Language definitions are required to associate code snippets with a particular language/file format, and to provide appropriate syntax highlighting. 4 | 5 | ## Installation 6 | Clone/download this folder's contents to the following path: 7 | - Windows _%USERPROFILE%\.vscode\extensions_ 8 | - MacOS _~/.vscode/extensions_ 9 | - Linux _~/.vscode/extensions_ 10 | 11 | Code should now automatically detect _.eel_ and _.jsfx_ files as EEL2 (for standard installations, languages are displayed in the bottom-right corner on the status bar). 12 | 13 | One more step is required to allow detection of JSFX files with no file extension. Because Code's pattern matcher is (currently) unable to match a negative, the simplest solution is to match everything in Reaper's Effects folder. Add the following to your User Settings: 14 | ```json 15 | "files.associations": { 16 | "**/REAPER/Effects/**": "eel2" 17 | } 18 | ``` 19 | Code should now detect **all** files in the folder as EEL2. -------------------------------------------------------------------------------- /snippets/lokasenna/lokasenna.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | // Place your snippets for lua here. Each snippet is defined under a snippet name and has a prefix, body and 3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 5 | // same ids are connected. 6 | // Example: 7 | // "Print to console": { 8 | // "prefix": "log", 9 | // "body": [ 10 | // "console.log('$1');", 11 | // "$2" 12 | // ], 13 | // "description": "Log output to console" 14 | // } 15 | 16 | "Msg": { 17 | "scope": "lua", 18 | "prefix": "msg", 19 | "body": [ 20 | 21 | "local function Msg(str)", 22 | " reaper.ShowConsoleMsg(tostring(str) .. \"\\n\")", 23 | "end\n\n$0", 24 | 25 | ], 26 | "description": "Print a string to a new line in the Reaper console" 27 | }, 28 | 29 | "Debug Msg": { 30 | "scope": "lua", 31 | "prefix": "dmsg", 32 | "body": [ 33 | 34 | "dm = true", 35 | "local function Msg(str)", 36 | " if dm then reaper.ShowConsoleMsg(tostring(str) .. \"\\n\") end", 37 | "end\n\n$0", 38 | 39 | ], 40 | "description": "Print a string to a new line in the Reaper console, with a global toggle." 41 | }, 42 | 43 | "ReaPack Header": { 44 | "scope": "lua", 45 | "prefix": "reapack", 46 | "body": [ 47 | "--[[", 48 | " Description: $1", 49 | " Version: 1.0.0", 50 | " Author: $2", 51 | " Changelog:", 52 | " ${3:Initial Release}", 53 | " Links:", 54 | " Forum Thread $4", 55 | " About:", 56 | " $5", 57 | "]]--\n\n$0", 58 | ], 59 | "description": "Header template for ReaPack-compatible scripts" 60 | }, 61 | 62 | "Comment Header": { 63 | "scope": "lua", 64 | "prefix": "head", 65 | "body": [ 66 | "------------------------------------", 67 | "-------- ${1:header}", 68 | "------------------------------------", 69 | "\n\n$0", 70 | ], 71 | "description": "Header block for comments", 72 | }, 73 | 74 | } -------------------------------------------------------------------------------- /walter/syntaxes/walter.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", 3 | "name": "Walter", 4 | "patterns": [ 5 | { 6 | "begin": "\\b\\s*(macro|globallayout|layout)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s+", 7 | "beginCaptures": { 8 | "1": { 9 | "name": "keyword.control.lua" 10 | }, 11 | "2": { 12 | "name": "entity.name.function.lua" 13 | } 14 | }, 15 | "end": "(;.*)?$", 16 | "endCaptures": { 17 | "0": { 18 | "name": "comment" 19 | } 20 | }, 21 | "name": "meta.function.lua", 22 | "patterns": [ 23 | { 24 | "match": "[a-zA-Z_][a-zA-Z0-9_]*", 25 | "name": "variable.parameter.function.lua" 26 | } 27 | ] 28 | }, 29 | { 30 | "include": "#comments" 31 | }, 32 | { 33 | "include": "#keywords" 34 | }, 35 | { 36 | "match": "\\b(tcp|mcp|master|envcp|trans)(\\.[\\.\\w]*)\\b", 37 | "name": "support.function.walter" 38 | }, 39 | { 40 | "include": "#constants" 41 | } 42 | ], 43 | "repository": { 44 | "comments": { 45 | "patterns": [ 46 | { 47 | "name": "comment", 48 | "match": "\\s*(;.*)" 49 | }, 50 | { 51 | "name": "comment", 52 | "match": "\\s*(#[<|>].*)" 53 | } 54 | ] 55 | }, 56 | "keywords": { 57 | "patterns": [ 58 | { 59 | "name": "keyword.control.walter", 60 | "match": "\\b(clear|reset|front|set|def|endmacro|endlayout)\\b" 61 | }, 62 | { 63 | "name": "keyword.control.walter", 64 | "match": "([\\!\\?])" 65 | }, 66 | { 67 | "name": "keyword.operator", 68 | "match": "(\\+|-|%|\\*|\\/|\\^|==?|~=|<=?|>=?)" 69 | } 70 | ] 71 | }, 72 | "constants": { 73 | "patterns": [ 74 | { 75 | "match": "(?=?|&&|!=|!|\\|\\||;)" 17 | }, 18 | { 19 | "begin": "\\b(function)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*(\\()", 20 | "beginCaptures": { 21 | "1": { 22 | "name": "keyword.control.lua" 23 | }, 24 | "2": { 25 | "name": "entity.name.function.lua" 26 | }, 27 | "3": { 28 | "name": "punctuation.definition.parameters.begin.lua" 29 | } 30 | }, 31 | "end": "\\)", 32 | "endCaptures": { 33 | "0": { 34 | "name": "punctuation.definition.parameters.end.lua" 35 | } 36 | }, 37 | "name": "meta.function.lua", 38 | "patterns": [ 39 | { 40 | "match": "[a-zA-Z_][a-zA-Z0-9_]*", 41 | "name": "variable.parameter.function.lua" 42 | } 43 | ] 44 | }, 45 | { 46 | "include": "#keywords" 47 | }, 48 | { 49 | "include": "#strings" 50 | }, 51 | { 52 | "include": "#constants" 53 | } 54 | ], 55 | "repository": { 56 | "keywords": { 57 | "patterns": [ 58 | { 59 | "name": "keyword.control.eel2", 60 | "match": "\\b(loop|while|return)\\b" 61 | }, 62 | { 63 | "name": "keyword.control.eel2", 64 | "match": "\\?|:" 65 | }, 66 | { 67 | "name": "keyword.function.eel2", 68 | "match": "\\b(function|end)\\b" 69 | }, 70 | { 71 | "name": "keyword.local.eel2", 72 | "match": "\\b(local)\\b" 73 | } 74 | ] 75 | }, 76 | "strings": { 77 | "name": "string.quoted.double.eel2", 78 | "begin": "\"", 79 | "end": "\"", 80 | "patterns": [ 81 | { 82 | "name": "constant.character.escape.eel2", 83 | "match": "\\\\." 84 | } 85 | ] 86 | }, 87 | "constants": { 88 | "patterns": [ 89 | { 90 | "match": "(?