Skip to content

Commit 9798d86

Browse files
authored
Merge pull request #8 from clojure-vim/docs
Create a Contributing doc to explain how to generate syntax and more
2 parents 15ce7f6 + 2be82d0 commit 9798d86

File tree

2 files changed

+56
-8
lines changed

2 files changed

+56
-8
lines changed

CONTRIBUTING.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributing
2+
3+
A large portion of the syntax file is generated using Clojure code in the
4+
`clj/` directory. Generation of Vim code in this fashion is preferred over
5+
hand crafting of the same.
6+
7+
There is an incomplete syntax test suite in `clj/test/`. Any additions and
8+
improvements to these tests are highly appreciated.
9+
10+
To contribute to Clojure.vim you will need [Leiningen][].
11+
12+
13+
## Update syntax files
14+
15+
When a new Clojure version is released, perform the following steps to update
16+
the syntax files to add syntax highlighting for new functions, macros and
17+
special forms.
18+
19+
```
20+
$ cd clj/
21+
$ lein repl
22+
> (load-file "src/vim_clojure_static/generate.clj")
23+
> (ns vim-clojure-static.generate)
24+
> (update-project! "..")
25+
```
26+
27+
### Update Unicode syntax
28+
29+
Update the file used to generate the Unicode character classes highlighted in Clojure
30+
regex strings.
31+
32+
```sh
33+
cd clj/
34+
./bin/update-unicode
35+
```
36+
37+
Then update the syntax files using the steps in the previous section.
38+
39+
40+
## Run tests
41+
42+
Run the test suite using this command:
43+
44+
```
45+
lein test
46+
```
47+
48+
49+
## Submit latest changes to upstream Vim
50+
51+
_WIP_
52+
53+
54+
[Leiningen]: https://leiningen.org/#install

README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,8 @@ Wiki](https://github.com/clojure-vim/clojure.vim/wiki/Plugins).
208208

209209
## Contribute!
210210

211-
Pull requests are welcome!
212-
213-
A large portion of the syntax file is generated from Clojure code in
214-
`clj/src/`. Generation of vim code in this fashion is preferred over hand
215-
crafting of the same.
216-
217-
There is an incomplete syntax test suite in `clj/test/`. Any additions and
218-
improvements to these tests are highly appreciated.
211+
Pull requests are welcome! Make sure to read the
212+
[`CONTRIBUTING.md`](CONTRIBUTING.md) for useful information.
219213

220214

221215
## Acknowledgements

0 commit comments

Comments
 (0)