@@ -47,15 +47,48 @@ Maximum scan distance of searchpairpos().
4747 let g:clojure_maxlines = 100
4848<
4949
50- *g:clojure_fuzzy_indent* *g:clojure_fuzzy_indent_patterns*
50+ *g:clojure_fuzzy_indent*
51+ *g:clojure_fuzzy_indent_patterns*
52+ *g:clojure_fuzzy_indent_blacklist*
5153
52- Indent words that match patterns as if they are included in 'lispwords'
54+ The 'lispwords' option is a list of comma-separated words that mark special
55+ forms whose following lines must be indented as if the word is on the
56+ first line alone.
57+
58+ For example:
59+ >
60+ (defn good []
61+ "Correct indentation")
62+
63+ (defn bad []
64+ "Incorrect indentation")
65+ <
66+
67+ If you would like to match words that match a pattern, you can use the
68+ fuzzy indent feature. The defaults are:
5369>
5470 " Default
5571 let g:clojure_fuzzy_indent = 1
72+ let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
73+ let g:clojure_fuzzy_indent_blacklist = ['^with-meta$', '-fn$']
74+
75+ " Legacy comma-delimited string version; the list format above is
76+ " recommended. Note that patterns are implicitly anchored with ^ and $.
5677 let g:clojure_fuzzy_indent_patterns = 'with.*,def.*,let.*'
5778<
5879
80+ *g:clojure_fuzzy_indent_patterns* and *g:clojure_fuzzy_indent_blacklist* are
81+ *Lists* of patterns that will be matched against the unqualified symbol at the
82+ head of a list. This means that a pattern like "^foo" will match all these
83+ candidates: "foobar", "my.ns/foobar", and "#'foobar".
84+
85+ Each candidate word is tested for special treatment in this order:
86+
87+ 1. Return true if word is literally in 'lispwords'
88+ 2. Return false if word matches a pattern in *g:clojure_fuzzy_indent_blacklist*
89+ 3. Return true if word matches a pattern in *g:clojure_fuzzy_indent_patterns*
90+ 4. Return false and indent normally otherwise
91+
5992 *g:clojure_align_multiline_strings*
6093
6194When indenting multiline strings, align subsequent lines to the column
0 commit comments