summaryrefslogtreecommitdiffstats
path: root/indent/clojure.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2022-10-14 17:40:10 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2022-10-14 17:40:10 +0200
commitbc8a81d3592dab86334f27d1d43c080ebf680d42 (patch)
treef367857d8c196d36f2d6dec3c2f6c9d703b06b7c /indent/clojure.vim
parent38282d58387cff48ac203f6912c05e4c8686141b (diff)
downloadvim-polyglot-bc8a81d3592dab86334f27d1d43c080ebf680d42.tar.gz
vim-polyglot-bc8a81d3592dab86334f27d1d43c080ebf680d42.zip
Update
Diffstat (limited to 'indent/clojure.vim')
-rw-r--r--indent/clojure.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/indent/clojure.vim b/indent/clojure.vim
index c6069324..583df7dd 100644
--- a/indent/clojure.vim
+++ b/indent/clojure.vim
@@ -55,6 +55,10 @@ if exists("*searchpairpos")
let g:clojure_align_subforms = 0
endif
+ if !exists('g:clojure_cljfmt_compat')
+ let g:clojure_cljfmt_compat = 0
+ endif
+
function! s:syn_id_name()
return synIDattr(synID(line("."), col("."), 0), "name")
endfunction
@@ -326,9 +330,16 @@ if exists("*searchpairpos")
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
elseif w[1] == '_'
return paren
+ elseif w[1] == "'" && g:clojure_cljfmt_compat
+ return paren
endif
endif
+ " Paren indent for keywords, symbols and derefs
+ if g:clojure_cljfmt_compat && w[0] =~# "[:@']"
+ return paren
+ endif
+
" Test words without namespace qualifiers and leading reader macro
" metacharacters.
"