Skip to content

[vim] add swiftTupleIndexNumber #19534

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

Merged
merged 2 commits into from
Sep 28, 2018

Conversation

tokorom
Copy link
Contributor

@tokorom tokorom commented Sep 25, 2018

When using tuples with index numbers, syntax highlighting uses swiftDecimal.
Therefore, I added swiftTupleIndexNumber and tried to improve it.

The highlight before added

2018-09-26 1 04 21

The highlight after added

2018-09-26 1 26 20

@harlanhaskins
Copy link
Contributor

@swift-ci please smoke test

@moiseev
Copy link
Contributor

moiseev commented Sep 25, 2018

How would that handle the named tuple fields? Like tuple.0.foo.1? Might as well fix that in the same PR if possible. Other than that, any improvement is good, thanks @tokorom !

@tokorom tokorom force-pushed the vim-tuple-index-number branch from 6c9c04a to fb99330 Compare September 25, 2018 22:27
@tokorom
Copy link
Contributor Author

tokorom commented Sep 26, 2018

@moiseev Thank you for review! I forgot about the named tuple fields.

I thought it, but I could not find a way to distinguish between the named tuple fields and the property access. Therefore extract only index numbers as a last resort.

On the other hand, considering the named tuple fields, the nextgroup of swiftTupleIndexNumber was useless. I fixed it to delete it.

The coloring of index numbers and named fields were referred to Xcode.

Xcode

xcode

Vim with this pull request

vim

Before this pull request

before

@moiseev
Copy link
Contributor

moiseev commented Sep 27, 2018

@swift-ci Please smoke test and merge

1 similar comment
@moiseev
Copy link
Contributor

moiseev commented Sep 28, 2018

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 2788883 into swiftlang:master Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants