├── .vscode └── launch.json ├── .vscodeignore ├── LICENSE ├── README.md ├── arduino.configuration.json ├── images ├── ArduinoCommunityLogo.png ├── Snippets.png └── SyntaxColoring.png ├── package.json ├── snippets └── arduino.json └── syntaxes └── arduino.tmLanguage /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch Extension", 6 | "type": "extensionHost", 7 | "request": "launch", 8 | "runtimeExecutable": "${execPath}", 9 | "args": [ "--extensionDevelopmentPath=${workspaceRoot}" ] 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | images/SyntaxColoring.png 2 | images/Snippets.png 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Pawel Kadluczka 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 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Arduino extension for Visual Studio Code 2 | 3 | Features: 4 | * Version 0.0.1 5 | * Syntax coloring for `.ino` and `.pde` files (based on [Arduino TextMate Bundle](https://github.com/nasser/arduino.tmbundle)) 6 | 7 | ![](https://raw.githubusercontent.com/moozzyk/ArduinoCode/master/images/SyntaxColoring.png) 8 | * Version 0.0.2 9 | * Snippets 10 | ![](https://raw.githubusercontent.com/moozzyk/ArduinoCode/master/images/Snippets.png) 11 | -------------------------------------------------------------------------------- /arduino.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 | ] 15 | } -------------------------------------------------------------------------------- /images/ArduinoCommunityLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moozzyk/ArduinoCode/a65cf499e1e2ad1bdb31a71ec5c78e34b4ceccaa/images/ArduinoCommunityLogo.png -------------------------------------------------------------------------------- /images/Snippets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moozzyk/ArduinoCode/a65cf499e1e2ad1bdb31a71ec5c78e34b4ceccaa/images/Snippets.png -------------------------------------------------------------------------------- /images/SyntaxColoring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moozzyk/ArduinoCode/a65cf499e1e2ad1bdb31a71ec5c78e34b4ceccaa/images/SyntaxColoring.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Arduino", 3 | "version": "0.0.4", 4 | "publisher": "moozzyk", 5 | "description": "Arduino support for Visual Studio Code", 6 | "author": { 7 | "name": "Pawel Kadluczka" 8 | }, 9 | "icon": "images/ArduinoCommunityLogo.png", 10 | "categories": [ 11 | "Languages" 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/moozzyk/ArduinoCode.git" 16 | }, 17 | "engines": { 18 | "vscode": "0.10.x" 19 | }, 20 | "contributes": { 21 | "languages": [{ 22 | "id": "arduino", 23 | "extensions": [ ".ino", ".pde" ], 24 | "aliases": [ "Arduino", "arduino" ], 25 | "configuration": "./arduino.configuration.json" 26 | }], 27 | "grammars": [{ 28 | "language": "arduino", 29 | "path": "./syntaxes/arduino.tmLanguage", 30 | "scopeName": "source.c++.arduino" 31 | }], 32 | "snippets": [ 33 | { 34 | "language": "arduino", 35 | "path": "./snippets/arduino.json" 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /snippets/arduino.json: -------------------------------------------------------------------------------- 1 | { 2 | "setup": { 3 | "prefix": "setup", 4 | "body": [ 5 | "void setup()", 6 | "{", 7 | "}" 8 | ], 9 | "description": "setup function" 10 | }, 11 | 12 | "loop": { 13 | "prefix": "loop", 14 | "body": [ 15 | "void loop()", 16 | "{", 17 | "}" 18 | ], 19 | "description": "loop function" 20 | }, 21 | 22 | "new sketch template": { 23 | "prefix": "new sketch", 24 | "body": [ 25 | "void setup()", 26 | "{", 27 | "}", 28 | "", 29 | "void loop()", 30 | "{", 31 | "}" 32 | ], 33 | "description": "New sketch template" 34 | }, 35 | } -------------------------------------------------------------------------------- /syntaxes/arduino.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | pde 8 | ino 9 | 10 | foldingStartMarker 11 | /\*\*|\{\s*$ 12 | foldingStopMarker 13 | \*\*/|^\s*\} 14 | name 15 | Arduino 16 | patterns 17 | 18 | 19 | include 20 | #special_block 21 | 22 | 23 | include 24 | source.c++ 25 | 26 | 27 | match 28 | \b(HIGH|LOW|INPUT|OUTPUT|DEC|BIN|HEX|OCT|BYTE|PI|HALF_PI|TWO_PI|LSBFIRST|MSBFIRST|CHANGE|FALLING|RISING|DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56|null)\b 29 | name 30 | constant.c++.arduino 31 | 32 | 33 | match 34 | \b(boolean|byte|word)\b 35 | name 36 | storage.c++.arduino 37 | 38 | 39 | match 40 | \b(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan|bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte|analogReference|analogRead|analogWrite|attachInterrupt|detachInterrupt|delay|delayMicroseconds|digitalWrite|digitalRead|interrupts|millis|micros|noInterrupts|noTone|pinMode|pulseIn|shiftOut|tone|begin|end|read|print|println|available|flush|setup|loop)\b 41 | name 42 | support.function.c++.arduino 43 | 44 | 45 | match 46 | \b(Serial\d?)\b 47 | name 48 | support.class.c++.arduino 49 | 50 | 51 | match 52 | \b(private|protected|public) 53 | name 54 | storage.modifier.c++.arduino 55 | 56 | 57 | scopeName 58 | source.c++.arduino 59 | uuid 60 | 65E5AFAE-4AE7-4DAE-837B-1B99810E464C 61 | 62 | 63 | --------------------------------------------------------------------------------