Skip to content

Commit c012e5a

Browse files
committed
Fix generate/vim-top-cluster
1 parent d776eca commit c012e5a

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

clj/src/vim_clojure_static/generate.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@
6868
[] coll))
6969

7070
(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]
71+
"Generate a Vimscript literal `syntax cluster` statement for `groups` and
72+
all top-level syntax groups in the given syntax buffer."
73+
[groups syntax-buf]
7474
(->> syntax-buf
7575
(re-seq #"syntax\s+(?:keyword|match|region)\s+(\S+)(?!.*\bcontained\b)")
7676
(map peek)
77-
(concat (map first keyword-groups))
77+
(concat groups)
7878
sort
7979
distinct
8080
(string/join \,)

clj/src/vim_clojure_static/update.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
g/vim-unicode-block-char-classes)
5656
"-*- TOP CLUSTER -*-"
5757
(qstr g/generation-comment
58-
(g/vim-top-cluster (slurp (fjoin dir "syntax/clojure.vim"))))}
58+
(g/vim-top-cluster (mapv first g/keyword-groups)
59+
(slurp (fjoin dir "syntax/clojure.vim"))))}
5960

6061
(fjoin dir "ftplugin/clojure.vim")
6162
{"-*- LISPWORDS -*-"

0 commit comments

Comments
 (0)