Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lisp] Rescopes parens to be consistent with the guidelines and Clojure. #2312

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Lisp/Lisp.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ contexts:
scope: keyword.operator.bitwise.lisp

parens:
- match: '\(\)'
scope: constant.language.lisp
- match: '\('
scope: punctuation.definition.group.begin.lisp
scope: punctuation.section.parens.begin.lisp
push:
- meta_scope: meta.group.lisp
- meta_scope: meta.parens.lisp
- match: '\)'
scope: punctuation.definition.group.end.lisp
scope: punctuation.section.parens.end.lisp
pop: true
- include: expressions
- include: parens
Expand Down
11 changes: 7 additions & 4 deletions Lisp/syntax_test_lisp.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
; ^^^ invalid.illegal.stray-bracket-end

(( #| nested |# ))
;^ meta.group punctuation.definition.group.begin
; ^ meta.group meta.group punctuation.definition.group.begin
;^ meta.parens punctuation.section.parens.begin
; ^ meta.parens meta.parens punctuation.section.parens.begin
; ^ comment
; ^ meta.group meta.group punctuation.definition.group.end
; ^ meta.group punctuation.definition.group.end
; ^ meta.parens meta.parens punctuation.section.parens.end
; ^ meta.parens punctuation.section.parens.end

;##########
; STRINGS #
Expand Down Expand Up @@ -87,6 +87,9 @@
(nil)
;^^^ constant.language

(())
;^^ constant.language

;#######################
; ARITHMETIC OPERATORS #
;#######################
Expand Down