Skip to content

Function declarations get tagged with function-call-face #174

Closed
@fermata101

Description

@fermata101

Function declarations should be getting tagged with the property swift-mode:function-name-face. Instead, they are incorrectly tagged with swift-mode:function-call-face (as can be observed by doing M-x describe-text-properties with cursor on the function name.)

By default, both faces inherit from Emacs' default font-lock-function-name-face. However, I prefer to highlight function declarations but not function calls.

I found that a simple fix was to swap the definitions of the two faces in swift-mode-font-lock.el, so that function-name-face comes before function-call-face. This fixed it for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions