@@ -55,7 +55,8 @@ filetype plugin indent on
5555Features
5656========
5757
58- * Syntax highlighting for Clojure and ClojureScript buffers.
58+ * [ Augmentable] ( #syntax-options ) syntax highlighting for Clojure and
59+ ClojureScript buffers.
5960
6061* [ Configurable] ( #indent-options ) Clojure-specific indentation.
6162
@@ -74,15 +75,14 @@ Third Party Extensions
7475
7576* Rainbow Parentheses
7677
77- kien's
78- [ ` rainbow_parentheses.vim ` ] ( https://github.com/kien/rainbow_parentheses.vim )
78+ kien's [ ` rainbow_parentheses.vim ` ] ( https://github.com/kien/rainbow_parentheses.vim )
7979 is highly recommended.
8080
8181* Extended Syntax Highlighting
8282
83- [ ` vim-clojure-highlight ` ] ( https://github.com/guns/vim-clojure-highlight )
84- is a fireplace.vim plugin that extends syntax highlighting to referred and
85- aliased vars.
83+ [ ` vim-clojure-highlight ` ] ( https://github.com/guns/vim-clojure-highlight ) is
84+ a fireplace.vim plugin that extends syntax highlighting to local, referred,
85+ and aliased vars via [ ` b:clojure_syntax_keywords ` ] ( #syntax-options ) .
8686
8787 This is a reimplementation of the DynamicHighlighting feature from
8888 VimClojure.
@@ -94,6 +94,31 @@ If you would like to get more serious about programming in Clojure, consider
9494using an interactive
9595[ Clojure REPL plugin] ( https://github.com/guns/vim-clojure-static/wiki/Clojure-REPL-Plugins ) .
9696
97+ Syntax Options
98+ ==============
99+
100+ Syntax highlighting for public vars from ` clojure.core ` is provided by
101+ default, but any symbol can be matched and highlighted by adding it to the
102+ ` g:clojure_syntax_keywords ` or ` b:clojure_syntax_keywords ` variables:
103+
104+ ``` vim
105+ let g:clojure_syntax_keywords = {
106+ \ 'clojureMacro': ["defproject", "defcustom"],
107+ \ 'clojureFunc': ["string/join", "string/replace"]
108+ \ }
109+ ```
110+
111+ See ` s:clojure_syntax_keywords ` in the [ syntax script] ( syntax/clojure.vim ) for
112+ a complete example.
113+
114+ The global version of this variable is intended for users that always wish
115+ to have a certain set of symbols highlighted in a certain way, while the
116+ buffer-local version is intended for plugin authors who wish to highlight
117+ symbols dynamically.
118+
119+ [ ` vim-clojure-highlight ` ] ( https://github.com/guns/vim-clojure-highlight ) uses
120+ this feature to highlight extra vars when connected to a REPL.
121+
97122Indent Options
98123==============
99124
0 commit comments