Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

SourceKit could provide more refined code highlighting #9

Open
aaroncrespo opened this issue Jul 30, 2016 · 6 comments
Open

SourceKit could provide more refined code highlighting #9

aaroncrespo opened this issue Jul 30, 2016 · 6 comments

Comments

@aaroncrespo
Copy link
Collaborator

Most of the language plugins use textmate style code highlighting which is mostly based on regex matching.
Sourcekitten/sourcekit can provide this information based on the AST which is how Xcode does it.

Super helpful in swift since it allows shadowing.

@RLovelett
Copy link
Owner

RLovelett commented Jul 31, 2016

This is something that would be extremely high on my priority list to get done. Though sadly I'm not sure how we feed the information to VSCode.

Can you provide a link to VSCode docs?

Also thanks for collaborating!

@aaroncrespo
Copy link
Collaborator Author

aaroncrespo commented Jul 31, 2016

The sourcekitten syntaxcommand returns ranges and decl types.

@aaroncrespo
Copy link
Collaborator Author

Missread the question yeah, looks like vscode only supports text mate style colorizers. And language servers and extensions might only support decorating text on top of that. This might be a 20% problem

@jchannon
Copy link

jchannon commented Aug 3, 2016

Could try seeing how omnisharp works for c#. Must have very similar issues integrating with VSCode as this extension will

@aaroncrespo
Copy link
Collaborator Author

looks like they use a text mate formatting file as well.

https://github.com/OmniSharp/omnisharp-vscode/issues?utf8=✓&q=is%3Aissue%20is%3Aopen%20color

Might be stuck unless vscode provides a different API.

@RLovelett
Copy link
Owner

It looks like the language server protocol that VS Code uses is going to be extended to support this in v3.0.

Implicitly though that means that as of right now it cannot support this. I am subscribed to the issue and plan to follow the implementation of it. That way whenever support for it does land this extension can take advantage of it.

@RLovelett RLovelett changed the title Sourcekitten could provide more refined code highlighting SourceKit could provide more refined code highlighting Dec 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants