Skip to content

Conversation

@tokorom
Copy link
Contributor

@tokorom tokorom commented Oct 1, 2018

Update only utils/vim/syntax/swift.vim

Improve the syntax highlight for typealias and associatedtype.

Problematic patterns

2018-10-02 8 45 25

Expects

2018-10-02 8 47 20

\ protocol
\ struct
\ typealias
\ associatedtype
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the list of keywords sorted.

@compnerd
Copy link
Member

compnerd commented Oct 2, 2018

Should we not highlight associatedtype as a keyword rather than a type identifier? I guess you can argue either way.

@tokorom
Copy link
Contributor Author

tokorom commented Oct 2, 2018

I read Declarations of Swift Language References and thought typealias and associatedtype to be close. That's because both typealias and associatedtype has typealias-name immediately afterwards.

That is a reason I moved associatedtype to swiftTypeDefinition.

typealias-declaration → attributes access-level-modifier typealias typealias-name generic-parameter-clause typealias-assignment

protocol-associated-type-declaration → attributes access-level-modifier associatedtype typealias-name type-inheritance-clause typealias-assignment generic-where-clause

2018-10-02 16 08 25

@tokorom tokorom closed this Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants