File tree 3 files changed +9
-21
lines changed
3 files changed +9
-21
lines changed Original file line number Diff line number Diff line change 60
60
[var]
61
61
(= " clojure.core" (-> var meta :ns str)))
62
62
63
- (defn refers [ns include-clojure-core?]
64
- (if include-clojure-core?
65
- (ns-refers ns )
66
- (remove (comp clojure-core? peek) (ns-refers ns ))))
67
-
68
63
(defn aliased-refers [ns ]
69
64
(mapcat
70
65
(fn [[alias alias-ns]]
87
82
(mapv (comp pr-str str first))
88
83
(string/join \,)
89
84
(format " '%s': [%s]" type))))
90
- (string/join \,)
91
- (format " let b:clojure_syntax_keywords = { %s }" )))
85
+ (string/join \,)))
92
86
93
87
(defn ns-syntax-command [ns & opts]
94
- (let [{:keys [local-vars clojure-core]
95
- :or {local-vars true clojure-core true }} (apply hash-map opts)
96
- refs (refers ns clojure-core)
97
- dict (syntax-keyword-dictionary (concat refs
88
+ (let [{:keys [local-vars] :or {local-vars true }} (apply hash-map opts)
89
+ dict (syntax-keyword-dictionary (concat (ns-refers ns )
98
90
(aliased-refers ns )
99
91
(when local-vars (ns-publics ns ))))]
100
- (str " let b:clojure_syntax_without_core_keywords = " (if clojure-core 1 0 )
101
- " | " dict)))
92
+ (str " let b:clojure_syntax_without_core_keywords = 1 | let b:clojure_syntax_keywords = {" dict " }" )))
Original file line number Diff line number Diff line change @@ -18,12 +18,13 @@ function! vim_clojure_highlight#syntax_match_references(...)
18
18
try
19
19
call s: require ()
20
20
21
- let ns = " '" . fireplace#ns ()
22
- let opts = (a: 0 > 0 && ! a: 1 ) ? ' :local-vars false' : ' '
23
- let opts .= (a: 0 > 1 && ! a: 2 ) ? ' :clojure-core false' : ' '
21
+ let ns = " '" . fireplace#ns ()
22
+ let opts = (a: 0 > 0 && ! a: 1 ) ? ' :local-vars false' : ' '
24
23
25
24
execute fireplace#evalparse (" (vim-clojure-highlight/ns-syntax-command " . ns . opts . " )" )
26
25
let &syntax = &syntax
27
26
catch /./
28
27
endtry
29
28
endfunction
29
+
30
+ " vim:noet :sw = 8 :ts = 8
Original file line number Diff line number Diff line change @@ -8,13 +8,9 @@ if !exists('g:clojure_highlight_local_vars')
8
8
let g: clojure_highlight_local_vars = 1
9
9
endif
10
10
11
- if ! exists (' g:clojure_highlight_clojure_core' )
12
- let g: clojure_highlight_clojure_core = 1
13
- endif
14
-
15
11
function ! s: syntax_match_references ()
16
12
if g: clojure_highlight_references
17
- call vim_clojure_highlight#syntax_match_references (g: clojure_highlight_local_vars, g: clojure_highlight_clojure_core )
13
+ call vim_clojure_highlight#syntax_match_references (g: clojure_highlight_local_vars )
18
14
endif
19
15
endfunction
20
16
You can’t perform that action at this time.
0 commit comments