Skip to content

Commit 77e2ebc

Browse files
committed
Removed separate EDN syntax, merged with main Clojure (Sublimed), detect keyword namespaces
1 parent 4b364bd commit 77e2ebc

8 files changed

+699
-765
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ Other changes:
1515

1616
- Built-in color scheme to utilize REPL and new syntax features.
1717
- Allow using `cljfmt` for formatting (requires `cljfmt` binary on `$PATH`)
18+
- Removed separate EDN syntax, merged with main Clojure (Sublimed)
1819
- Settings can now be specified in main `Preferences.sublime-settings` as well. Just prepend `clojure_sublimed_` to each setting’s name.
19-
- Detect namespaces with meta
20+
- REPL can detect namespaces with meta on ns form
2021

2122
### 3.8.0 - Aug 8, 2024
2223

Clojure (Sublimed).sublime-syntax

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
%YAML 1.2
22
---
3-
# http://www.sublimetext.com/docs/3/syntax.html
3+
# https://www.sublimetext.com/docs/syntax.html
44
name: Clojure (Sublimed)
5-
file_extensions: [clj, cljs, cljc, cljx, boot, bb]
5+
file_extensions: [clj, cljs, cljc, cljx, boot, bb, edn]
66
scope: source.clojure
77
variables:
88
wsb: '(?<=^|[\s,()\[\]{}~''`"^@]|#_)'
@@ -229,11 +229,12 @@ contexts:
229229
- include: forms
230230

231231
keyword:
232-
- match: '{{wsb}}(::?){{keyword}}(?:(/){{keyword}})?{{wse}}'
232+
- match: '{{wsb}}(::?)(?:{{keyword}}|({{keyword}})(/){{keyword}}){{wse}}'
233233
scope: constant.other.keyword.clojure
234234
captures:
235-
1: punctuation.definition.constant.begin.clojure
236-
2: punctuation.definition.constant.namespace.clojure
235+
1: punctuation.definition.keyword.begin.clojure
236+
2: meta.namespace.keyword.clojure
237+
3: punctuation.definition.namespace.clojure
237238
pop: 1
238239

239240
integer:
@@ -353,7 +354,7 @@ contexts:
353354
scope: source.symbol.def.clojure
354355
captures:
355356
1: meta.namespace.symbol.clojure
356-
2: punctuation.definition.symbol.namespace.clojure
357+
2: punctuation.definition.namespace.clojure
357358
pop: 1
358359
push: list_second
359360

@@ -362,7 +363,7 @@ contexts:
362363
scope: source.symbol.clojure entity.name.clojure
363364
captures:
364365
1: meta.namespace.symbol.clojure
365-
2: punctuation.definition.symbol.namespace.clojure
366+
2: punctuation.definition.namespace.clojure
366367
pop: 1
367368
push: list_rest
368369

@@ -371,15 +372,15 @@ contexts:
371372
scope: source.symbol.unused.clojure
372373
captures:
373374
1: meta.namespace.symbol.clojure
374-
2: punctuation.definition.symbol.namespace.clojure
375+
2: punctuation.definition.namespace.clojure
375376
pop: 1
376377

377378
symbol:
378379
- match: '{{wsb}}(?:{{symbol}}|({{ns_symbol}})(/){{symbol}}){{wse}}'
379380
scope: source.symbol.clojure
380381
captures:
381382
1: meta.namespace.symbol.clojure
382-
2: punctuation.definition.symbol.namespace.clojure
383+
2: punctuation.definition.namespace.clojure
383384
pop: 1
384385

385386
vector:

Clojure Sublimed Dark.sublime-color-scheme

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"scope": "entity.name - entity.name.tag - meta.metadata",
5656
"foreground": "var(blue)"},
5757

58-
{"name": "Namespaces",
59-
"scope": "meta.namespace, punctuation.definition.symbol.namespace",
58+
{"name": "Symbol namespaces",
59+
"scope": "meta.namespace.symbol, source.symbol punctuation.definition.namespace",
6060
"foreground": "var(gray)"},
6161

6262
{"name": "Unused symbol",

Clojure Sublimed Light.sublime-color-scheme

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
"scope": "entity.name - entity.name.tag - meta.metadata",
5454
"background": "var(blue)"},
5555

56-
{"name": "Namespaces",
57-
"scope": "meta.namespace, punctuation.definition.symbol.namespace",
56+
{"name": "Symbol namespaces",
57+
"scope": "meta.namespace.symbol, source.symbol punctuation.definition.namespace",
5858
"foreground": "var(gray)"},
5959

6060
{"name": "Unused symbol",

EDN (Sublimed).sublime-syntax

Lines changed: 0 additions & 199 deletions
This file was deleted.

test_scheme/color_scheme.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11

22
; Constants
3-
nil true false \c \tab 1 1.0 1/2 :a :a.b/c.d #inst "1985-01-25"
3+
nil true false \c \tab 1 1.0 1/2 #inst "1985-01-25"
44

55
; Symbols
66
abc ab/cd _abc
77

8+
; Keywords
9+
:a :a.b/c.d ::ab ::a.b/c.d
10+
811
; Strings
912
"" "abc" "\" \u221e \x"
1013

0 commit comments

Comments
 (0)