Skip to content

Commit 69a0b6f

Browse files
committed
In README, mention the replacements for each old indent config option
1 parent 9800368 commit 69a0b6f

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,16 @@ offers ways to adjust the indentation.
6161
> The indentation code has recently been rebuilt which included the
6262
> removal/replacement of the following configuration options:
6363
>
64-
> - `clojure_maxlines`
65-
> - `clojure_align_subforms`
66-
> - `clojure_align_multiline_strings`
67-
> - `clojure_fuzzy_indent`
68-
> - `clojure_fuzzy_indent_blacklist`
69-
> - `clojure_special_indent_words`
70-
> - `clojure_cljfmt_compat`
71-
> - `'lispwords'`
64+
> | Config option | Replacement (if any) |
65+
> |-----------------------------------|------------------------------------|
66+
> | `clojure_maxlines` | |
67+
> | `clojure_cljfmt_compat` | `clojure_indent_style` |
68+
> | `clojure_align_subforms` | `clojure_indent_style` |
69+
> | `clojure_align_multiline_strings` | `clojure_indent_multiline_strings` |
70+
> | `clojure_fuzzy_indent` | |
71+
> | `clojure_fuzzy_indent_blacklist` | |
72+
> | `clojure_special_indent_words` | `clojure_indent_rules` |
73+
> | `'lispwords'` | `clojure_indent_rules` |
7274
7375

7476
### Indentation style

indent/clojure.vim

+4-8
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,13 @@ call s:SConf('clojure_fuzzy_indent_patterns', [
5252
" - 1+: 2 space indentation, no alignment.
5353
" Defaults copied from: https://github.com/clojure-emacs/clojure-mode/blob/0e62583b5198f71856e4d7b80e1099789d47f2ed/clojure-mode.el#L1800-L1875
5454
call s:SConf('clojure_indent_rules', {
55-
\ 'ns': 1,
56-
\ 'fn': 1, 'def': 1, 'defn': 1, 'bound-fn': 1,
57-
\ 'let': 1, 'binding': 1, 'defmethod': 1,
55+
\ 'fn': 1, 'def': 1, 'defn': 1, 'bound-fn': 1, 'let': 1, 'binding': 1, 'defmethod': 1,
5856
\ 'if': 1, 'if-not': 1, 'if-some': 1, 'if-let': 1,
5957
\ 'when': 1, 'when-not': 1, 'when-some': 1, 'when-let': 1, 'when-first': 1,
6058
\ 'case': 1, 'cond': 0, 'cond->': 1, 'cond->>': 1, 'condp': 2,
6159
\ 'while': 1, 'loop': 1, 'for': 1, 'doseq': 1, 'dotimes': 1,
62-
\ 'do': 0, 'doto': 1, 'comment': 0, 'as->': 2,
63-
\ 'delay': 0, 'future': 0, 'locking': 1,
64-
\ 'try': 0, 'catch': 2, 'finally': 0,
60+
\ 'ns': 1, 'do': 0, 'doto': 1, 'comment': 0, 'as->': 2,
61+
\ 'delay': 0, 'future': 0, 'locking': 1, 'try': 0, 'catch': 2, 'finally': 0,
6562
\ 'reify': 1, 'proxy': 2, 'defrecord': 2, 'defprotocol': 1, 'definterface': 1,
6663
\ 'extend': 1, 'extend-protocol': 1, 'extend-type': 1,
6764
"\ (letfn) (1 ((:defn)) nil)
@@ -265,8 +262,7 @@ function! s:ListIndent(delim_pos)
265262

266263
" TODO: handle complex indentation (e.g. letfn) and introduce
267264
" indentation config similar to Emacs' clojure-mode and cljfmt.
268-
" This new config option `clojure_indent_rules` should replace most
269-
" other indentation options. Skip if "traditional" style was chosen.
265+
" Skip if "traditional" style was chosen.
270266

271267
" TODO: simplify this.
272268
let syms = split(ln_content, '[[:space:],;()\[\]{}@\\"^~`]', 1)

0 commit comments

Comments
 (0)