diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d4da8e3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# Contributing + +A large portion of the syntax file is generated using Clojure code in the +`clj/` directory. Generation of Vim code in this fashion is preferred over +hand crafting of the same. + +There is an incomplete syntax test suite in `clj/test/`. Any additions and +improvements to these tests are highly appreciated. + +To contribute to Clojure.vim you will need [Leiningen][]. + + +## Update syntax files + +When a new Clojure version is released, perform the following steps to update +the syntax files to add syntax highlighting for new functions, macros and +special forms. + +``` +$ cd clj/ +$ lein repl +> (load-file "src/vim_clojure_static/generate.clj") +> (ns vim-clojure-static.generate) +> (update-project! "..") +``` + +### Update Unicode syntax + +Update the file used to generate the Unicode character classes highlighted in Clojure +regex strings. + +```sh +cd clj/ +./bin/update-unicode +``` + +Then update the syntax files using the steps in the previous section. + + +## Run tests + +Run the test suite using this command: + +``` +lein test +``` + + +## Submit latest changes to upstream Vim + +_WIP_ + + +[Leiningen]: https://leiningen.org/#install diff --git a/README.md b/README.md index 2a5c50f..4e6db92 100644 --- a/README.md +++ b/README.md @@ -208,14 +208,8 @@ Wiki](https://github.com/clojure-vim/clojure.vim/wiki/Plugins). ## Contribute! -Pull requests are welcome! - -A large portion of the syntax file is generated from Clojure code in -`clj/src/`. Generation of vim code in this fashion is preferred over hand -crafting of the same. - -There is an incomplete syntax test suite in `clj/test/`. Any additions and -improvements to these tests are highly appreciated. +Pull requests are welcome! Make sure to read the +[`CONTRIBUTING.md`](CONTRIBUTING.md) for useful information. ## Acknowledgements