diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-03-01 00:15:51 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-03-01 00:15:51 +0100 |
commit | 9b3b092d15503ed70ea4bf60c4e1345b196c3677 (patch) | |
tree | 45fdb6e08c380ab8bfe0988c66b15ab014688a55 /ftplugin/clojure.vim | |
parent | 959a2ffa3ddf3a716b37e15d0034546236a97957 (diff) | |
download | vim-polyglot-9b3b092d15503ed70ea4bf60c4e1345b196c3677.tar.gz vim-polyglot-9b3b092d15503ed70ea4bf60c4e1345b196c3677.zip |
Update
Diffstat (limited to 'ftplugin/clojure.vim')
-rw-r--r-- | ftplugin/clojure.vim | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ftplugin/clojure.vim b/ftplugin/clojure.vim index b46b9c80..2741a3a1 100644 --- a/ftplugin/clojure.vim +++ b/ftplugin/clojure.vim @@ -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+=?,-,*,!,+,/,=,<,>,.,:,$ @@ -30,6 +30,21 @@ setlocal formatoptions-=t 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/%%RELEASE_TAG%%/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 |