summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/clojure.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-03-22 21:02:50 +0100
committerBram Moolenaar <Bram@vim.org>2014-03-22 21:02:50 +0100
commita68783751647e3243ca6f22df62907efbdbccb02 (patch)
tree372908fd79defec22190b6d2a48bbc6155bb22e7 /runtime/ftplugin/clojure.vim
parented287f9a4e3f4ed5528ad2af65b7b23bce14a688 (diff)
Updated runtime files.
Diffstat (limited to 'runtime/ftplugin/clojure.vim')
-rw-r--r--runtime/ftplugin/clojure.vim19
1 files changed, 17 insertions, 2 deletions
diff --git a/runtime/ftplugin/clojure.vim b/runtime/ftplugin/clojure.vim
index 2b935a577e..8a89877435 100644
--- a/runtime/ftplugin/clojure.vim
+++ b/runtime/ftplugin/clojure.vim
@@ -5,7 +5,7 @@
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
-" Last Change: 08 September 2013
+" Last Change: 16 February 2014
if exists("b:did_ftplugin")
finish
@@ -15,7 +15,7 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
-let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring<'
+let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring< lispwords<'
setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$
@@ -31,6 +31,21 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal comments=n:;
setlocal commentstring=;\ %s
+" Specially indented symbols from clojure.core and clojure.test.
+"
+" Clojure symbols are indented in the defn style when they:
+"
+" * Define vars and anonymous functions
+" * Create new lexical scopes or scopes with altered environments
+" * Create conditional branches from a predicate function or value
+"
+" The arglists for these functions are generally in the form of [x & body];
+" Functions that accept a flat list of forms do not treat the first argument
+" specially and hence are not indented specially.
+"
+" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-009/clj/src/vim_clojure_static/generate.clj
+setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doall,dorun,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
+
" Provide insert mode completions for special forms and clojure.core. As
" 'omnifunc' is set by popular Clojure REPL client plugins, we also set
" 'completefunc' so that the user has some form of completion available when