X-Git-Url: https://git.r.bdr.sh/rbdr/api-notation.vscode/blobdiff_plain/4549164147a331c583651f87d3d0490eb0a0397f..refs/heads/main:/README.md?ds=sidebyside diff --git a/README.md b/README.md index 99d0857..d472f13 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,70 @@ -# API Notation for VSCode +# API Notation Syntax for Atom -Syntax Highlight Plugin for VSCode \ No newline at end of file +This is a grammar for api notation, a simple notation I've been using for +annotating module APIs in specs and other documents. + +## Installing + +### From Command Line + +`code --install-extension rbdr.api-notation` + +### From GUI + +#### Open the Extension Manager from Palette Manager + +1. Press `⌘⇧P` on OSX or `⌃⇧P` on Windows/Linux to open the palette manager +2. Look for `Install Ext4ensions + +#### Open the Package Manager from Preferences + +1. Go to `Code -> Preferences -> Extensions` menu item + +#### Install it + +1. Search for `api-notation` in the search bar +2. Click Install + + +## Usage + +Open a `.api` file, or set it as your syntax. + +## API Notation Reference + +The most recent reference as of now is in this [textt file][api-reference], so +check that to be sure. But here's a reproduction of the notation. + +``` +NameOfClass.WithPossibleNamespace + + class property + - instance property + ~> listened events (socket) + +> listened events (class/module) + -> listened events (instance) + <~ dispatched events (socket) + <+ dispatched events(class/module) + <- dispatched events (instance) + :: class method + # instance method + +Other symbols + => returns +->() callback return +[xx] optional + data type + +Recommended order: class first, then sockets, then instance. Internally: +Properties, events, methods. + +// Anything after two forward slashes is a comment +``` + +## How does it look like? + +Like this. + +![Like this.][api-example] + +[api-reference]: https://gitlab.com/rbdr/txt/-/blob/main/reference/api_notation.md +[api-example]: https://i.imgur.com/63TyFMe.png