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

Syntax highlighting broken #22

Closed
samscott89 opened this issue Jan 26, 2018 · 11 comments
Closed

Syntax highlighting broken #22

samscott89 opened this issue Jan 26, 2018 · 11 comments
Assignees

Comments

@samscott89
Copy link

Hey.

Awesome project!

Just noticed the syntax highlighting appears to be broken. I don't think it's capturing the end of scopes properly?

amp-highlighting-rust.

@wlcx
Copy link

wlcx commented Jan 29, 2018

image

Seeing similar issues with go files
Amp: 0.3.2
OS: Ubuntu Artful

@ccapitalK
Copy link
Contributor

image
Seeing similar issues with python as well.
Amp: 0.3.2
OS: Arch Linux

@Jackojc
Copy link

Jackojc commented May 5, 2018

Similar issues with C++.
Version: 0.3.4_2
OS: Void Linux

@Jackojc
Copy link

Jackojc commented May 5, 2018

Is it the internal syntax for C++ that's messing up or is it elsewhere? Would it be possible to override the default C++ syntax file with an alternative that does work?

@jmacdonald
Copy link
Owner

@Jackojc no, unfortunately this is a bug in amp. The good news is, it's what I'm working on at the moment, and is the last blocking bug fix before the 0.4.0 release. 🙂

@samscott89
Copy link
Author

For anyone else with this issue, there was more discussion of this in #61. Though I assume the workaround proposed there is about to be superseded :)

@mseri mseri mentioned this issue May 9, 2018
@Jackojc
Copy link

Jackojc commented Jun 6, 2018

Has this been fixed in 0.4.0? I don't see any mention of it in the changelog so just curious.

@jmacdonald
Copy link
Owner

@Jackojc sadly, no. I've been short on time over the last month and haven't been able to give it the attention it needs to prevent blocking a long overdue release. It'll be the first issue on the table, now that 0.4.0 is out the door! 🙂

@Jackojc
Copy link

Jackojc commented Jun 6, 2018

No worries at all! I understand this is just a side project of your and you have better things to be doing. <3

@jmacdonald
Copy link
Owner

This fix has landed in master; please do try it out when you have a moment. If there are no major issues, I'll cut a new official release.

Thanks for being patient!

@ccapitalK
Copy link
Contributor

I've tried it out a bit, everything seems to work. Nice job!

jmacdonald added a commit that referenced this issue Jul 6, 2018
The previous implementation used scribe's TokenIterator, re-implementing
the calculation of styles that HighlightIterator already provides.
Additionally, this implementation should be much easier to cache, as the
parse state isn't tied to buffer data (the TokenIterator type can only
be used with the buffer version/state from which it was generated).

Fixes #22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants