setting LPeg lexers in scintillua

20 views
Skip to first unread message

Saigon

unread,
Dec 20, 2011, 6:25:02 AM12/20/11
to scite-interest
hi,

i'm trying to set up my sql lexers in order to add code folding
support exactly like in properties files. for instance :

[-][1st section]....only display the sections headers when folding
code
select * from table1
select * from table2
select * from table5
[-][2nd section]....only display the sections headers when folding
code
select * from table1
--comments blabla ...

i don't know how to implement this in _foldsymbols
thanks for your help :)

ps : sorry for my bad english :-/


mitchell

unread,
Dec 20, 2011, 9:22:52 PM12/20/11
to scite-interest
Hi,

I don't understand what you are trying to fold. The '[-][1st section]...'
and 'code' parts are throwing me off. Are they part of your SQL?

If your code is indented consistently, then maybe fold.by.indentation=1 is
what you are looking for?

mitchell

Minh souppaya

unread,
Dec 21, 2011, 6:02:18 AM12/21/11
to scite-i...@googlegroups.com
I was confused in my explanation, sorry.
I want to fold each block of code under square brackets []. 
The following codes aren't neccesary indented therefor fold.by.indentation=1 don't help me much.

Minh

2011/12/21 mitchell <co...@caladbolg.net>


mitchell

--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest@googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.


mitchell

unread,
Dec 26, 2011, 4:05:44 AM12/26/11
to scite-i...@googlegroups.com
On Wed, 21 Dec 2011, Minh souppaya wrote:

> I was confused in my explanation, sorry.
> I want to fold each block of code under square brackets [].�
> The following codes aren't neccesary indented therefor fold.by.indentation=1 don't help me much.

I don't see how you can detect if a [] sequence is a beginning or an end
so I doubt it's possible to do what you are suggesting.

mitchell

>
> Minh
>
> 2011/12/21 mitchell <co...@caladbolg.net>
> Hi,
>
> On Tue, 20 Dec 2011, Saigon wrote:
> hi,
>
> i'm trying to set up my sql lexers in order to add code folding
> support exactly like in properties files. for instance :
>
> [-][1st section]....only display the sections headers when folding
> code
> �select * from table1
> �select * from table2
> �select * from table5
> [-][2nd section]....only display the sections headers when folding
> code
> �select * from table1
> �--comments blabla ...
>
> i don't know how to implement this in _foldsymbols
> thanks for your help :)
>
>
> I don't understand what you are trying to fold. The '[-][1st section]...' and 'code' parts are throwing me off. Are they part of your
> SQL?
>
> If your code is indented consistently, then maybe fold.by.indentation=1 is what you are looking for?
>
> mitchell
>
> --
> You received this message because you are subscribed to the Google Groups "scite-interest" group.

> To post to this group, send email to scite-i...@googlegroups.com.
> To unsubscribe from this group, send email to scite-interes...@googlegroups.com.


> For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.
>
>

> --
> You received this message because you are subscribed to the Google Groups "scite-interest" group.

> To post to this group, send email to scite-i...@googlegroups.com.
> To unsubscribe from this group, send email to scite-interes...@googlegroups.com.


> For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.
>
>

mitchell

Reply all
Reply to author
Forward
0 new messages