Commits

Meikel Brandmeyer  committed 2055662

Made (comment) to be highlighted as such (thanks to Parth Malwankar)

However highlighting the whole expression as comment is not possible
due to nested (). So only the comment keyword is highlighted.

  • Participants
  • Parent commits 12a96ef

Comments (0)

Files changed (1)

File syntax/clojure.vim

 " Vim syntax file
 " Language:	   Clojure
-" Last Change: 2008-08-19
+" Last Change: 2008-08-24
 " Maintainer:  Toralf Wittner <toralf.wittner@gmail.com>
 
 if version < 600
     finish
 endif
 
+if exists("g:clj_highlight_builtins")
+    "Highlight Clojure's predefined functions"
+    syn keyword clojureFunc ! * *agent* *command-line-args* *in* *macro-meta* *ns* *out* *print-meta* *print-readably* *proxy-classes* *warn-on-reflection* + - -> .. / < <= = == > >= accessor agent agent-errors aget alength all-ns alter and apply array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc await await-for bean binding bit-and bit-not bit-or bit-shift-left bit-shift-right bit-xor boolean butlast byte cast char class clear-agent-errors commute comp comparator complement concat cond conj cons constantly construct-proxy contains? count create-ns create-struct cycle dec defmacro defmethod defmulti defn defn- defstruct deref destructure disj dissoc distinct doall doc dorun doseq dosync dotimes doto double drop drop-while ensure eval every? false? ffirst file-seq filter find find-doc find-ns find-var first float flush fnseq for frest gensym get get-proxy-class hash-map hash-set identity if-let import inc instance? int interleave into into-array iterate key keys keyword keyword? last lazy-cat lazy-cons line-seq list list* load load-file locking long macroexpand macroexpand-1 make-array map map? mapcat max max-key memfn merge merge-with meta min min-key name namespace neg? newline nil? not not-any? not-every? not= ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unmap nth nthrest or partial peek pmap pop pos? pr pr-str print print-doc print-str println println-str prn prn-str proxy proxy-mappings quot rand rand-int range re-find re-groups re-matcher re-matches re-pattern re-seq read read-line reduce ref ref-set refer rem remove-method remove-ns repeat replace replicate require resolve rest resultset-seq reverse rfirst rrest rseq scan second select-keys send send-off seq seq? set short slurp some sort sort-by sorted-map sorted-map-by sorted-set special-symbol? split-at split-with str string? struct struct-map subs subvec symbol symbol? sync take take-nth take-while test this time to-array to-array-2d touch tree-seq true? update-proxy val vals var-get var-set var? vector vector? when when-first when-let when-not with-local-vars with-meta with-open with-out-str xml-seq zero? zipmap repeatedly add-classpath vec hash
+    highlight default link clojureFunc Special
+endif
+
 syn keyword clojureTodo contained FIXME XXX
 syn match clojureComment contains=clojureTodo ";.*$"
+syn keyword clojureComment comment
 
 syn match clojureNil "\<nil\>"
 
 syn match clojureAnonArg contained "%\(\d\|&\)\?"
 syn match clojureVarArg contained "&"
 
+syn region clojureSexp matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=TOP
 syn region clojureAnonFn matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,clojureVarArg
-syn region clojureSexp matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=TOP
 syn region clojureVector matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,clojureAnonArg
 syn region clojureMap matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" contains=TOP
 syn region clojureSet matchgroup=Delimiter start="#{" matchgroup=Delimiter end="}" contains=TOP
 highlight default link clojureVarArg Constant
 highlight default link clojureBoolean Constant
 
-if exists("g:clj_highlight_builtins")
-    "Highlight Clojure's predefined functions"
-    syn keyword clojureFunc ! * *agent* *command-line-args* *in* *macro-meta* *ns* *out* *print-meta* *print-readably* *proxy-classes* *warn-on-reflection* + - -> .. / < <= = == > >= accessor agent agent-errors aget alength all-ns alter and apply array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc await await-for bean binding bit-and bit-not bit-or bit-shift-left bit-shift-right bit-xor boolean butlast byte cast char class clear-agent-errors comment commute comp comparator complement concat cond conj cons constantly construct-proxy contains? count create-ns create-struct cycle dec defmacro defmethod defmulti defn defn- defstruct deref destructure disj dissoc distinct doall doc dorun doseq dosync dotimes doto double drop drop-while ensure eval every? false? ffirst file-seq filter find find-doc find-ns find-var first float flush fnseq for frest gensym get get-proxy-class hash-map hash-set identity if-let import inc instance? int interleave into into-array iterate key keys keyword keyword? last lazy-cat lazy-cons line-seq list list* load load-file locking long macroexpand macroexpand-1 make-array map map? mapcat max max-key memfn merge merge-with meta min min-key name namespace neg? newline nil? not not-any? not-every? not= ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unmap nth nthrest or partial peek pmap pop pos? pr pr-str print print-doc print-str println println-str prn prn-str proxy proxy-mappings quot rand rand-int range re-find re-groups re-matcher re-matches re-pattern re-seq read read-line reduce ref ref-set refer rem remove-method remove-ns repeat replace replicate require resolve rest resultset-seq reverse rfirst rrest rseq scan second select-keys send send-off seq seq? set short slurp some sort sort-by sorted-map sorted-map-by sorted-set special-symbol? split-at split-with str string? struct struct-map subs subvec symbol symbol? sync take take-nth take-while test this time to-array to-array-2d touch tree-seq true? update-proxy val vals var-get var-set var? vector vector? when when-first when-let when-not with-local-vars with-meta with-open with-out-str xml-seq zero? zipmap repeatedly add-classpath vec hash
-    highlight default link clojureFunc Special
-endif
-
 let b:current_syntax = "clojure"
-