├── .vscode └── launch.json ├── LICENSE ├── README.md ├── Release Notes.md ├── language-configuration.json ├── package.json ├── screenshot_1.png ├── syntaxes └── zone.tmLanguage.json ├── vsc-extension-quickstart.md └── vscode-zonefile-0.0.4.vsix /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | { 3 | "version": "0.1.0", 4 | "configurations": [ 5 | { 6 | "name": "Launch Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}" ] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Compilenix 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 | # Donate if you want 2 | https://www.paypal.me/compilenix 3 | 4 | # Bind Zone File Syntax Highlighting 5 | 6 | Here's a very basic syntax highlighting package for zone files. 7 | 8 | ## Screenshots 9 | 10 | ![1](https://raw.githubusercontent.com/compilenix/vscode-zonefile/master/screenshot_1.png) 11 | 12 | ## Other 13 | - Source code: https://github.com/compilenix/vscode-zonefile 14 | - Visual Studio Code Marketplace: https://marketplace.visualstudio.com/items?itemName=Compilenix.vscode-zonefile 15 | -------------------------------------------------------------------------------- /Release Notes.md: -------------------------------------------------------------------------------- 1 | # 0.0.4 2 | - Add .dns as a recognized extension 3 | 4 | # 0.0.3 5 | - Add .db as a recognized extension 6 | -------------------------------------------------------------------------------- /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 | }, 6 | // symbols used as brackets 7 | "brackets": [ 8 | ["{", "}"], 9 | ["[", "]"], 10 | ["(", ")"] 11 | ], 12 | // symbols that are auto closed when typing 13 | "autoClosingPairs": [ 14 | ["{", "}"], 15 | ["[", "]"], 16 | ["(", ")"], 17 | ["\"", "\""], 18 | ["'", "'"] 19 | ], 20 | // symbols that that can be used to surround a selection 21 | "surroundingPairs": [ 22 | ["{", "}"], 23 | ["[", "]"], 24 | ["(", ")"], 25 | ["\"", "\""], 26 | ["'", "'"] 27 | ] 28 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-zonefile", 3 | "displayName": "vscode-zonefile", 4 | "description": "Bind Zone File syntax highlighting", 5 | "version": "0.0.4", 6 | "publisher": "Compilenix", 7 | "author": { 8 | "email": "Compilenix@gmail.com", 9 | "name": "Compilenix", 10 | "url": "https://compilenix.org/" 11 | }, 12 | "contributors": [ 13 | { 14 | "email": "pcfens@wm.edu", 15 | "name": "Phil Fenstermacher", 16 | "url": "https://github.com/pcfens" 17 | } 18 | ], 19 | "license": "MIT", 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/compilenix/vscode-zonefile" 23 | }, 24 | "bugs": { 25 | "url": "https://github.com/compilenix/vscode-zonefile/issues" 26 | }, 27 | "engines": { 28 | "vscode": "^1.15.0" 29 | }, 30 | "categories": [ 31 | "Programming Languages" 32 | ], 33 | "contributes": { 34 | "languages": [{ 35 | "id": "zone", 36 | "aliases": ["Bind9 DNS Zone", "zone"], 37 | "extensions": [".zone", ".signed", ".db", ".dns"], 38 | "configuration": "./language-configuration.json" 39 | }], 40 | "grammars": [{ 41 | "language": "zone", 42 | "scopeName": "text.zone_file", 43 | "path": "./syntaxes/zone.tmLanguage.json" 44 | }] 45 | } 46 | } -------------------------------------------------------------------------------- /screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CompileNix/vscode-zonefile/0d19da3feb41a150d9f4a1b818cdd61f4c226d61/screenshot_1.png -------------------------------------------------------------------------------- /syntaxes/zone.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bind9 DNS Zone", 3 | "scopeName": "text.zone_file", 4 | "fileTypes": ["zone", "db"], 5 | "patterns": [{ 6 | "match": ";.*", 7 | "name": "comment.line.semicolon.zone_file" 8 | }, 9 | { 10 | "match": "@", 11 | "name": "keyword.directive.zone_file" 12 | }, 13 | { 14 | "match": "\\$(ORIGIN|origin|TTL|ttl|INCLUDE|include)\\s*([^;]*)(;.*)?", 15 | "name": "keyword.directive.zone_file", 16 | "captures": { 17 | "2": { 18 | "name": "variable.other.directive.zone_file" 19 | }, 20 | "3": { 21 | "name": "comment.line.semicolon.zone_file" 22 | } 23 | } 24 | }, 25 | { 26 | "match": "\\d+(H|h|D|d|W|w|M|m|Y|y)", 27 | "name": "variable.other.timeunit.zone_file" 28 | }, 29 | { 30 | "begin": "([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)\\(", 31 | "beginCaptures": { 32 | "2": { 33 | "name": "variable.other.timeunit.zone_file" 34 | }, 35 | "3": { 36 | "name": "keyword.resourcetype.zone_file" 37 | }, 38 | "4": { 39 | "name": "string.quoted.single.resource.address.zone_file" 40 | } 41 | }, 42 | "patterns": [{ 43 | "match": ";.*", 44 | "name": "comment.line.semicolon.zone_file" 45 | }], 46 | "end": "\\)", 47 | "name": "string.quoted.single.address.zone_file" 48 | }, 49 | { 50 | "match": "([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)", 51 | "name": "string.quoted.single.address.zone_file", 52 | "captures": { 53 | "2": { 54 | "name": "variable.other.timeunit.zone_file" 55 | }, 56 | "3": { 57 | "name": "keyword.resourcetype.zone_file" 58 | }, 59 | "4": { 60 | "name": "string.quoted.single.resource.address.zone_file" 61 | } 62 | } 63 | } 64 | ], 65 | "uuid": "e7258f23-3f2a-4b03-80e1-ac8990b47a6d" 66 | } 67 | -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | * This folder contains all of the files necessary for your extension 5 | * `package.json` - this is the manifest file in which you declare your language support and define 6 | the location of the grammar file that has been copied into you extension. 7 | * `syntaxes/zone.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization 8 | * `language-configuration.json` - this the language configuration, defining the tokens that are used for 9 | comments and brackets. 10 | 11 | ## Get up and running straight away 12 | * Make sure the language configuration settings in `language-configuration.json` are accurate 13 | * press `F5` to open a new window with your extension loaded 14 | * create a new file with a file name suffix matching your language 15 | * verify that syntax highlight works and that the language configuration settings are working 16 | 17 | ## Make changes 18 | * you can relaunch the extension from the debug toolbar after making changes to the files listed above 19 | * you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes 20 | 21 | ## Add more language features 22 | * To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at 23 | https://code.visualstudio.com/docs 24 | 25 | ## Install your extension 26 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 27 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. -------------------------------------------------------------------------------- /vscode-zonefile-0.0.4.vsix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CompileNix/vscode-zonefile/0d19da3feb41a150d9f4a1b818cdd61f4c226d61/vscode-zonefile-0.0.4.vsix --------------------------------------------------------------------------------