|
| 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 |
0 commit comments