Syntax highlighting

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Syntax highlighting

Craig Dabelstein
Hi everyone,

I've written a LilyPond syntax highlighter for pygments. It's not perfect but it's mostly working. Is there anyone out there who could test it?


I'm sure there is lots that could be improved on it. It is running without errors, but it is failing the pull request tests and I don't know why. I'm not experienced enough to work it out.

Thanks everyone,

Craig




--
Craig Dabelstein
Owner
Maxime's Music
M: 0404884173
A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
W: concertbandmusicstore.com[hidden email]

 
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighting

Urs Liska-3
Am Samstag, den 25.01.2020, 17:48 +1000 schrieb Craig Dabelstein:
Hi everyone,

I've written a LilyPond syntax highlighter for pygments. It's not perfect but it's mostly working. Is there anyone out there who could test it?


Thank you for working on it.

How does one test it?
First clone the repository and install pygments from there (its `setup.py`) I suppose. The README suggests using `pip`, which surely wouldn't work, isn't it?

I have installed Pygments through pip3, is there a way to avoid a conflict, e.g. by *not* installing your pygments clone but directly invoke the proper executable?

I suppose testing would be done through using the command line version as described on https://pygments.org/docs/cmdline/ ?

Best
Urs


I'm sure there is lots that could be improved on it. It is running without errors, but it is failing the pull request tests and I don't know why. I'm not experienced enough to work it out.

Thanks everyone,

Craig




Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighting

Henning Hraban Ramm-3

> Am 2020-01-25 um 10:45 schrieb Urs Liska <[hidden email]>:
>
> Am Samstag, den 25.01.2020, 17:48 +1000 schrieb Craig Dabelstein:
>> Hi everyone,
>>
>> I've written a LilyPond syntax highlighter for pygments. It's not perfect but it's mostly working. Is there anyone out there who could test it?
>>
>> https://github.com/craigdab/pygments/tree/LilyPond
>
> Thank you for working on it.
>
> How does one test it?
> First clone the repository and install pygments from there (its `setup.py`) I suppose. The README suggests using `pip`, which surely wouldn't work, isn't it?
>
> I have installed Pygments through pip3, is there a way to avoid a conflict, e.g. by *not* installing your pygments clone but directly invoke the proper executable?

It would make sense to create a virtualenv, activate it and install Craig’s pygments there via setup.py


Greetlings, Hraban
---
fiëé visuëlle
Henning Hraban Ramm
https://www.fiee.net





Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighting

Craig Dabelstein

Hi all,

This is what I've been doing to test, after cloning the repo. Instructions start halfway down this page: https://pygments.org/docs/lexerdevelopment/

You probably don;t even have to `make mapfiles` on this LilyPond branch.

  1. Run make mapfiles

  2. Run the lexer to convert the LilyPond file to html: python -m pygments -O full -f html -o /tmp/example.html tests/examplefiles/example.ily

  3. Open the html file: /tmp/example.html


On Sat, 25 Jan 2020 at 23:50, Henning Hraban Ramm <[hidden email]> wrote:

> Am 2020-01-25 um 10:45 schrieb Urs Liska <[hidden email]>:
>
> Am Samstag, den 25.01.2020, 17:48 +1000 schrieb Craig Dabelstein:
>> Hi everyone,
>>
>> I've written a LilyPond syntax highlighter for pygments. It's not perfect but it's mostly working. Is there anyone out there who could test it?
>>
>> https://github.com/craigdab/pygments/tree/LilyPond
>
> Thank you for working on it.
>
> How does one test it?
> First clone the repository and install pygments from there (its `setup.py`) I suppose. The README suggests using `pip`, which surely wouldn't work, isn't it?
>
> I have installed Pygments through pip3, is there a way to avoid a conflict, e.g. by *not* installing your pygments clone but directly invoke the proper executable?

It would make sense to create a virtualenv, activate it and install Craig’s pygments there via setup.py


Greetlings, Hraban
---
fiëé visuëlle
Henning Hraban Ramm
https://www.fiee.net







--
Craig Dabelstein
Owner
Maxime's Music
M: 0404884173
A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
W: concertbandmusicstore.com[hidden email]