Skip to content

Commit

Permalink
Fix face of function names
Browse files Browse the repository at this point in the history
Fixes #174.
  • Loading branch information
taku0 committed Oct 17, 2021
1 parent babe36c commit e246264
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions swift-mode-font-lock.el
Original file line number Diff line number Diff line change
Expand Up @@ -653,16 +653,16 @@ Excludes true, false, and keywords begin with a number sign.")
.
'swift-mode:builtin-precedence-group-face)

;; Method/function calls
("\\<\\(\\(\\sw\\|\\s_\\)+\\)\\>\\??\\s-*("
1
'swift-mode:function-call-face)

;; Function and type declarations
(swift-mode:font-lock-match-declared-function-names
.
'swift-mode:function-name-face)

;; Method/function calls
("\\<\\(\\(\\sw\\|\\s_\\)+\\)\\>\\??\\s-*("
1
'swift-mode:function-call-face)

;; Property accesses
(swift-mode:font-lock-match-property-access
.
Expand Down
4 changes: 4 additions & 0 deletions test/swift-files/font-lock/font-lock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ foo +!+!+!+!+ bbb // "foo +!+!+!+!+ bbb"
//

enum Foo: Error { .foo } // #("enum Foo: Error { .foo }" 0 4 (face swift-mode:keyword-face) 5 8 (face swift-mode:function-name-face) 10 15 (face swift-mode:builtin-type-face) 19 22 (face swift-mode:property-access-face))

func foo() { // #("func foo() {" 0 4 (face swift-mode:keyword-face) 5 8 (face swift-mode:function-name-face))
foo() // #(" foo()" 4 7 (face swift-mode:function-call-face))
}

0 comments on commit e246264

Please sign in to comment.