Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-06

SynEdit and lazarus IDE

8 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello List,

I've started last week to work on a Syntax highlighter for the Ruby language for SynEdit.
You can find it here: http://github.com/ik5/SynEdit-syntaxes .

I have many things I do not understand in the highlighter issue. For example how to create the ident (I've looked at the sources of other languages, yet I do not understand how it's been done). This is one of the things I require help at the moment to understand.

How do I make the folding issues ?
And the list goes on (I'll ask it when I'll need to implement it, when I do not understand).

This beginning of working for it, started because I think Lazarus is a great IDE, and it should support additional programming languages (For now non GUI development). Because I use Ruby a lot, and we do not have any Syntax Highlighter for it, I decided to try and make Lazarus to support Ruby at first.

If any of you think also that Lazarus should support additional languages as part of the IDE (not only the coloring of the syntax that is), I will be glad if people will help me in this manner.

Thanks,
Ido

http://ik.homelinux.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100604/9d2aecf8/attachment.html>

Reply by email

Mattias Gärtner
to ik

Zitat von ik :

Show quoted text 9 lines
Hello List, I've started last week to work on a Syntax highlighter for the Ruby language for SynEdit. You can find it here: http://github.com/ik5/SynEdit-syntaxes . I have many things I do not understand in the highlighter issue. For example how to create the ident (I've looked at the sources of other languages, yet I do not understand how it's been done).

What do you mean with "ident"?

This is one of the things I require help at the moment to understand. How do I make the folding issues ?

See TSynPasSyn. Search for everything containing the word "fold". Basically:
- define an enum for every fold block type (see TPascalCodeFoldBlockType).
- define a range class (for example TSynRubySynRange, you can copy TSynPasSynRange and rename all Pas in Ruby). The range class is needed to store the code fold state for every line of synedit. (all lines with the same state share the same range object).
Martin, maybe some parts can be moved to a TSynCustomHighlighterFoldedRange?
- then see all overrides in TSynPasSyn. I guess Ruby will do many things similar, just with other enums and keywords.

Maybe Martin can give a small paragraph, how the store/restore of code fold ranges work. Then we can put that all together and put into a wiki page.

Show quoted text 8 lines
And the list goes on (I'll ask it when I'll need to implement it, when I do not understand). This beginning of working for it, started because I think Lazarus is a great IDE, and it should support additional programming languages (For now non GUI development). Because I use Ruby a lot, and we do not have any Syntax Highlighter for it, I decided to try and make Lazarus to support Ruby at first.

Great.

If any of you think also that Lazarus should support additional languages as part of the IDE (not only the coloring of the syntax that is), I will be glad if people will help me in this manner.

Yes.
I already started a few things. For example you can register your own identifier completion. I plan to support other compilers too.

Mattias

Reply by email

Martin
to ik: I've started last week to work on a Syntax highlighter for the Ruby language for SynEdit.…
ik wrote 10 lines
Hello List, I've started last week to work on a Syntax highlighter for the Ruby language for SynEdit. You can find it here: http://github.com/ik5/SynEdit-syntaxes . I have many things I do not understand in the highlighter issue. For example how to create the ident (I've looked at the sources of other languages, yet I do not understand how it's been done). This is one of the things I require help at the moment to understand.

you mean indent? Not handled by the highlighter, see the SynBeautifier (or codetools even)

Show quoted text 14 lines
How do I make the folding issues ? And the list goes on (I'll ask it when I'll need to implement it, when I do not understand). This beginning of working for it, started because I think Lazarus is a great IDE, and it should support additional programming languages (For now non GUI development). Because I use Ruby a lot, and we do not have any Syntax Highlighter for it, I decided to try and make Lazarus to support Ruby at first. If any of you think also that Lazarus should support additional languages as part of the IDE (not only the coloring of the syntax that is), I will be glad if people will help me in this manner.

There is subclass for folding highlighters, that gives you ar clue what is needed.

See http://wiki.lazarus.freepascal.org/SynEdit_Highlighter See also the docs dir in SynEdit (open the XML), it's very little, but some is about highlighters.

The Simplest highlighters with fold are SynLFMSyn and SynDiffSyn (the LFM is better, it's using the more generic approach, the diff highlighter takes some shortcuts, that will not work for other languages)

Martin

Reply by email

Rigel Rig

Finally told what is the main objective of Lazarus: to support many compilers ?and after some time to stop maintain FPC! Thanks for the explanation! Too bad for Pascal.

?

Show quoted text 72 lines
??: Mattias G?rtner ???????: Re: [Lazarus] SynEdit and lazarus IDE ??: ????????? ??: ?????, 2010, ??? 4 14:16:48 EEST Zitat von ik : > Hello List, > > I've started last week to work on a Syntax highlighter for the Ruby language > for SynEdit. > You can find it here: http://github.com/ik5/SynEdit-syntaxes . > > I have many things I do not understand in the highlighter issue. > For example how to create the ident (I've looked at the sources of other > languages, yet I do not understand how it's been done). What do you mean with "ident"? > This is one of the things I require help at the moment to understand. > > How do I make the folding issues ? See TSynPasSyn. Search for everything containing the word "fold". Basically: - define an enum for every fold block type (see TPascalCodeFoldBlockType). - define a range class (for example TSynRubySynRange, you can copy TSynPasSynRange and rename all Pas in Ruby). The range class is needed to store the code fold state for every line of synedit. (all lines with the same state share the same range object). Martin, maybe some parts can be moved to a TSynCustomHighlighterFoldedRange? - then see all overrides in TSynPasSyn. I guess Ruby will do many things similar, just with other enums and keywords. Maybe Martin can give a small paragraph, how the store/restore of code fold ranges work. Then we can put that all together and put into a wiki page. > And the list goes on (I'll ask it when I'll need to implement it, when I do > not understand). > > This beginning of working for it, started because I think Lazarus is a great > IDE, and it should support additional programming languages (For now non GUI > development). Because I use Ruby a lot, and we do not have any Syntax > Highlighter for it, I decided to try and make Lazarus to support Ruby at > first. Great. > If any of you think also that Lazarus should support additional languages as > part of the IDE (not only the coloring of the syntax that is), I will be > glad if people will help me in this manner. Yes. I already started a few things. For example you can register your own identifier completion. I plan to support other compilers too. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus ?

----------------------------------------------------------------- ????? ???-??????????? ?? ?????????? ?????????? ? ???. ????? ?????? ?? ???! http://sportni.bg/worldcup2010/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100604/22d58c75/attachment.html>

Reply by email

ik
to Rigel Rig

2010/6/4 Rigel Rig

Finally told what is the main objective of Lazarus: to support many compilers and after some time to stop maintain FPC! Thanks for the explanation! Too bad for Pascal.

You are wrong. Lazarus is an IDE, it should support many languages including FPC, rather then only FPC or Pascal in general.
I think it will bring additional man power for Lazarus (and FPC), and will also better recognition for Pascal as a programming language.

Also, I use Pascal, Perl, PHP, Ruby and few other programming languages. If I could have support for all of them in one place like Lazarus, but without the problems of IDE's such as Eclipse or NetBeans, then I'll program even better.

Ido

Show quoted text 97 lines
>??: Mattias G?rtner >???????: Re: [Lazarus] SynEdit and lazarus IDE >??: >????????? ??: ?????, 2010, ??? 4 14:16:48 EEST >Zitat von ik : > >> Hello List, >> >> I've started last week to work on a Syntax highlighter for the Ruby language >> for SynEdit. >> You can find it here: http://github.com/ik5/SynEdit-syntaxes . >> >> I have many things I do not understand in the highlighter issue. >> For example how to create the ident (I've looked at the sources of other >> languages, yet I do not understand how it's been done). > >What do you mean with "ident"? > > >> This is one of the things I require help at the moment to understand. >> >> How do I make the folding issues ? > >See TSynPasSyn. Search for everything containing the word "fold". >Basically: >- define an enum for every fold block type (see TPascalCodeFoldBlockType). >- define a range class (for example TSynRubySynRange, you can copy >TSynPasSynRange and rename all Pas in Ruby). The range class is needed >to store the code fold state for every line of synedit. (all lines >with the same state share the same range object). >Martin, maybe some parts can be moved to a TSynCustomHighlighterFoldedRange? >- then see all overrides in TSynPasSyn. I guess Ruby will do many >things similar, just with other enums and keywords. > >Maybe Martin can give a small paragraph, how the store/restore of code >fold ranges work. Then we can put that all together and put into a >wiki page. > > >> And the list goes on (I'll ask it when I'll need to implement it, when I do >> not understand). >> >> This beginning of working for it, started because I think Lazarus is a great >> IDE, and it should support additional programming languages (For now non GUI >> development). Because I use Ruby a lot, and we do not have any Syntax >> Highlighter for it, I decided to try and make Lazarus to support Ruby at >> first. > >Great. > > >> If any of you think also that Lazarus should support additional languages as >> part of the IDE (not only the coloring of the syntax that is), I will be >> glad if people will help me in this manner. > >Yes. >I already started a few things. For example you can register your own >identifier completion. I plan to support other compilers too. > > >Mattias > > > > >-- >_______________________________________________ >Lazarus mailing list > >http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > ----------------------------------------------------------------- ????? ???-??????????? ?? ?????????? ?????????? ? ???. ????? ?????? ?? ???! <http://a.abv.bg/www/delivery/ck.php?oaparams=2__bannerid=2453__zoneid=63__oadest=http://sportni.bg/worldcup2010/> -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100604/483162ac/attachment-0001.html>

Reply by email

ik
to Mattias Gärtner: Zitat von ik : What do you mean with "ident"? See TSynPasSyn. Search for everything…

http://ik.homelinux.org/

2010/6/4 Mattias G?rtner

Show quoted text 16 lines
Zitat von ik : Hello List, > > I've started last week to work on a Syntax highlighter for the Ruby > language > for SynEdit. > You can find it here: http://github.com/ik5/SynEdit-syntaxes . > > I have many things I do not understand in the highlighter issue. > For example how to create the ident (I've looked at the sources of other > languages, yet I do not understand how it's been done). > What do you mean with "ident"?

Identifiers.

Show quoted text 64 lines
This is one of the things I require help at the moment to understand. > > How do I make the folding issues ? > See TSynPasSyn. Search for everything containing the word "fold". Basically: - define an enum for every fold block type (see TPascalCodeFoldBlockType). - define a range class (for example TSynRubySynRange, you can copy TSynPasSynRange and rename all Pas in Ruby). The range class is needed to store the code fold state for every line of synedit. (all lines with the same state share the same range object). Martin, maybe some parts can be moved to a TSynCustomHighlighterFoldedRange? - then see all overrides in TSynPasSyn. I guess Ruby will do many things similar, just with other enums and keywords. Maybe Martin can give a small paragraph, how the store/restore of code fold ranges work. Then we can put that all together and put into a wiki page. And the list goes on (I'll ask it when I'll need to implement it, when I > do > not understand). > > This beginning of working for it, started because I think Lazarus is a > great > IDE, and it should support additional programming languages (For now non > GUI > development). Because I use Ruby a lot, and we do not have any Syntax > Highlighter for it, I decided to try and make Lazarus to support Ruby at > first. > Great. If any of you think also that Lazarus should support additional languages > as > part of the IDE (not only the coloring of the syntax that is), I will be > glad if people will help me in this manner. > Yes. I already started a few things. For example you can register your own identifier completion. I plan to support other compilers too. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100604/08d6cbbf/attachment.html>

Reply by email