@@ -35,20 +35,14 @@ function! s:Conf(opt, fallback) abort
35
35
return get (b: , a: opt , get (g: , a: opt , a: fallback ))
36
36
endfunction
37
37
38
- " Available options:
39
- " - standard (Emacs equiv: always-align)
40
- " - traditional (Emacs equiv: align-arguments)
41
- " - uniform (Emacs equiv: always-indent)
42
38
call s: SConf (' clojure_indent_style' , ' standard' )
43
- call s: SConf (' clojure_align_multiline_strings ' , 0 )
39
+ call s: SConf (' clojure_indent_multiline_strings ' , ' standard ' )
44
40
call s: SConf (' clojure_fuzzy_indent_patterns' , [
45
41
\ ' ^with-\%(meta\|in-str\|out-str\|loading-context\)\@!' ,
46
42
\ ' ^def' ,
47
43
\ ' ^let'
48
44
\ ])
49
45
50
- " NOTE: When in "uniform" mode, ignores the "indent_style" and "indent_patterns" options.
51
-
52
46
" FIXME: fix reader conditional tests. Include (:require [...]) test cases.
53
47
" Is it possible to fix reader conditional indentation?
54
48
@@ -237,13 +231,13 @@ function! s:StringIndent(delim_pos)
237
231
let m = mode ()
238
232
if m == # ' i' || (m == # ' n' && ! s: EqualsOperatorInEffect ())
239
233
" If in insert mode, or normal mode but "=" is not in effect.
240
- let alignment = s: Conf (' clojure_align_multiline_strings ' , s: clojure_align_multiline_strings )
241
- " -1: Indent along left edge, like traditional Lisps .
242
- " 0 : Indent in alignment with end of the string start delimiter .
243
- " 1: Indent in alignment with string start delimiter.
244
- if alignment == -1 | return 0
245
- elseif alignment == 1 | return s: PosToCharCol (a: delim_pos )
246
- else
234
+ let alignment = s: Conf (' clojure_indent_multiline_strings ' , s: clojure_indent_multiline_strings )
235
+ " standard: Indent in alignment with end of the string start delimiter .
236
+ " traditional : Indent along left edge, like traditional Lisps .
237
+ " pretty: Indent in alignment with string start delimiter.
238
+ if alignment == # ' traditional ' | return 0
239
+ elseif alignment == # ' pretty ' | return s: PosToCharCol (a: delim_pos )
240
+ else " standard
247
241
let col = a: delim_pos [1 ]
248
242
let is_regex = col > 1 && getline (a: delim_pos [0 ])[col - 2 ] == # ' #'
249
243
return s: PosToCharCol (a: delim_pos ) - (is_regex ? 2 : 1 )
0 commit comments