]> git.r.bdr.sh - rbdr/api-notation.vim/blame - README.md
Update README
[rbdr/api-notation.vim] / README.md
CommitLineData
41d7b8b0
BB
1# API Notation Syntax for Vim
2
3This is a syntax for api notation, a simple notation I've been using for
4annotating module APIs in specs and other documents.
5
b59ef936
RBR
6*Using Neovim? Try [tree-sitter-api-notation][new] instead*
7
d047e007
BB
8## Installing
9
10Install with pathogen:
11
121. Clone the repo or copy the files to your `.vim/bundle` dir
132. Reload the vim
143. Enjoy the vim
15
41d7b8b0
BB
16## API Notation Reference
17
59d97d8e 18The most recent reference as of now is in this [text file][api-reference], so
41d7b8b0
BB
19check that to be sure. But here's a reproduction of the notation.
20
21```
d5fd8b33 22NameOfClass.WithPossibleNamespace
41d7b8b0
BB
23 + class property
24 - instance property
25 ~> listened events (socket)
26 +> listened events (class/module)
27 -> listened events (instance)
28 <~ dispatched events (socket)
29 <+ dispatched events(class/module)
30 <- dispatched events (instance)
31 :: class method
32 # instance method
33
34Other symbols
35 => returns
36->() callback return
37[xx] optional
38<xx> data type
39
40Recommended order: class first, then sockets, then instance. Internally:
41Properties, events, methods.
d5fd8b33
BB
42
43// Anything after two forward slashes is a comment
41d7b8b0
BB
44```
45
b59ef936 46## What does it look like?
41d7b8b0
BB
47
48Like this.
49
50![Like this.][api-example]
51
b59ef936 52[api-reference]: https://www.unlimited.pizza/api.html
81f525f7 53[api-example]: https://i.imgur.com/OreLcmE.png
b59ef936 54[new]: https://git.sr.ht/~rbdr/tree-sitter-api-notation