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

include swift syntax highlighting #8

Closed
nhooyr opened this issue Apr 8, 2019 · 14 comments · May be fixed by #11
Closed

include swift syntax highlighting #8

nhooyr opened this issue Apr 8, 2019 · 14 comments · May be fixed by #11
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nhooyr
Copy link

nhooyr commented Apr 8, 2019

No description provided.

@cmyr cmyr added enhancement New feature or request help wanted Extra attention is needed labels Apr 8, 2019
@mmatoszko
Copy link
Member

mmatoszko commented May 3, 2019

Is it something which is hard to do? I would love to work on it, but I need some tips how this should be done

What I understand for now is that we use syntect which uses Sublime text syntax definitions. Should we just take Sublime Text package for the Swift programming language, make it work for syntect and then add this to this repo?

@cmyr
Copy link
Member

cmyr commented May 3, 2019

No, this should not be hard! The steps are approximately as follows:

  • find a good syntax definition (sublime or textmate) for the swift language, that has a permissive open source licence.
  • add that syntax definition to this repo
  • when that is merged, open a pr in the xi-editor repo that updates the syntect-resources submodule to include the new syntax definition
  • update xi-mac to point to the new xi-editor
  • write swift!

@cmyr
Copy link
Member

cmyr commented May 3, 2019

And: you should be able to test out the syntax by just putting it in xi-mac/xi-editor/syntect-resources and rebuilding xi-mac.

@mmatoszko
Copy link
Member

Thanks!

@mmatoszko
Copy link
Member

Ok then.. I did some research and it looks like Swift Sublime Text packages are outdated. I will refresh my knowledge once in a while in order to support Swift 😄

@naclcaleb
Copy link

I found this, which has no license: https://github.com/GregoryBL/SwiftSyntax/blob/master/Swift.sublime-syntax

@cmyr
Copy link
Member

cmyr commented May 14, 2019

From the readme it looks like MIT, so that's fine. we'll want to copy the license into a file if we take it on.

@naclcaleb
Copy link

Yes, sorry I was about to clarify that after reading the LICENSE section. I didn't see it before.

@cmyr
Copy link
Member

cmyr commented May 14, 2019

This will also be quite out of date (it's at least two versoins of swift behind?) and it doesn't have metadata, but could be an okay starting point.

@naclcaleb
Copy link

We might be able to update it, but I don't know whether that would affect the licensing?

@cmyr
Copy link
Member

cmyr commented May 14, 2019

Nope, we're free to do whatever we want, we're just expected to include the original license text intact. :)

@naclcaleb
Copy link

Ok, I'm making a PR as we speak...

@naclcaleb
Copy link

Ok, there you go. If that gets merged, I can follow through with a PR on xi-editor, and hopefully xi-mac as well.

@nhooyr
Copy link
Author

nhooyr commented Nov 22, 2019

Going to close as it has been a while and I'm not sure if this is relevant anymore.

@nhooyr nhooyr closed this as completed Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants