Skip to content

Commit

Permalink
Remove some unnecessary indentation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
axvr committed Sep 22, 2024
1 parent f271dca commit 856ff1a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions indent/clojure.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ if !exists('g:clojure_indent_rules')
\ 'let': 1, 'binding': 1, 'defmethod': 1,
\ 'if': 1, 'if-not': 1, 'if-some': 1, 'if-let': 1,
\ 'when': 1, 'when-not': 1, 'when-some': 1, 'when-let': 1, 'when-first': 1,
\ 'case': 1, 'cond': 0, 'cond->': 1, 'cond->>': 1, 'condp': 2,
\ 'case': 1, 'cond->': 1, 'cond->>': 1, 'condp': 2,
\ 'while': 1, 'loop': 1, 'for': 1, 'doseq': 1, 'dotimes': 1,
\ 'do': 0, 'doto': 1, 'comment': 0, 'as->': 2,
\ 'delay': 0, 'future': 0, 'locking': 1,
\ 'try': 0, 'catch': 2, 'finally': 0,
\ 'doto': 1, 'as->': 2,
\ 'locking': 1, 'catch': 2,
\ 'reify': 1, 'proxy': 2, 'defrecord': 2, 'defprotocol': 1, 'definterface': 1,
\ 'extend': 1, 'extend-protocol': 1, 'extend-type': 1
\ }
Expand All @@ -64,9 +63,7 @@ if !exists('g:clojure_indent_rules')
\ })

" core.async
call extend(g:clojure_indent_rules, {
\ 'alt!': 0, 'alt!!': 0, 'go': 0, 'go-loop': 1, 'thread': 0
\ })
call extend(g:clojure_indent_rules, { 'go-loop': 1 })

" core.logic
call extend(g:clojure_indent_rules, {
Expand Down Expand Up @@ -286,7 +283,7 @@ function! s:ListIndent(delim_pos)
endfor

let rules = s:Conf('clojure_indent_rules', {})
let sym_match = get(rules, sym, -1)
let sym_match = get(rules, sym)
" TODO: handle 2+ differently?
if sym_match > 0 | return base_indent + 1 | endif
endif
Expand Down

0 comments on commit 856ff1a

Please sign in to comment.