File tree Expand file tree Collapse file tree
clj/src/vim_clojure_static Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 :else (conj v (str x))))
6868 [] coll))
6969
70+ (defn vim-top-cluster
71+ " Generate a Vimscript literal `syntax cluster` statement for all top-level
72+ syntax groups in the given syntax buffer."
73+ [syntax-buf]
74+ (->> syntax-buf
75+ (re-seq #"syntax\s +(?:keyword|match|region)\s +(\S +)(?!.*\b contained\b )" )
76+ (map peek)
77+ sort
78+ distinct
79+ (string/join \,)
80+ (format " syntax cluster clojureTop contains=@Spell,%s\n " )))
81+
7082; ;
7183; ; Definitions
7284; ;
272284 " Vimscript literal `setlocal lispwords=` statement."
273285 (str " setlocal lispwords=" (string/join \, (sort lispwords)) " \n " ))
274286
275- (def vim-top-cluster
276- " Vimscript literal `syntax cluster` for all top-level syntax groups."
277- (->> " ../syntax/clojure.vim"
278- slurp
279- (re-seq #"syntax\s +(?:keyword|match|region)\s +(\S +)(?!.*\b contained\b )" )
280- (map peek)
281- sort
282- distinct
283- (string/join \,)
284- (format " syntax cluster clojureTop contains=@Spell,%s\n " )))
285-
286287(comment
287288 ; ; Generate the vim literal definitions for pasting into the runtime files.
288289 (spit " tmp/clojure-defs.vim"
300301 vim-unicode-block-char-classes
301302 \newline
302303 generation-comment
303- vim-top-cluster
304+ ( vim-top-cluster ( slurp " ../syntax/clojure.vim " ))
304305 \newline
305306 generation-comment
306307 vim-lispwords
You can’t perform that action at this time.
0 commit comments