Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-18 Thread Nick Treleaven

On 17/01/2012 20:36, Lex Trotman wrote:

I think if all is needed is to copy SciLexer.h and the new lexer file, plus
  minor makefile changes, then a patch should be acceptable without upgrading
  Scintilla. We've done this in the past.

Hi Nick,

How does this work without a filetype to support the new lexer?  And
don't we need additions to sciwrappers to map the filetype keys to
scintilla style enums?


Obviously. My point was that selectively applying parts of a Scintilla 
update is acceptable if it is unlikely to cause bugs outside of use of 
the new feature being applied. You seemed to imply that it was 
dangerous/difficult to do that without updating all of Scintilla.

___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-18 Thread Lex Trotman
On Thu, Jan 19, 2012 at 3:46 AM, Nick Treleaven
nick.trelea...@btinternet.com wrote:
 On 17/01/2012 20:36, Lex Trotman wrote:

 I think if all is needed is to copy SciLexer.h and the new lexer file,
 plus
   minor makefile changes, then a patch should be acceptable without
  upgrading
   Scintilla. We've done this in the past.

 Hi Nick,

 How does this work without a filetype to support the new lexer?  And
 don't we need additions to sciwrappers to map the filetype keys to
 scintilla style enums?


 Obviously. My point was that selectively applying parts of a Scintilla
 update is acceptable if it is unlikely to cause bugs outside of use of the
 new feature being applied. You seemed to imply that it was
 dangerous/difficult to do that without updating all of Scintilla.

Wasn't meant to imply that.

Cheers
Lex


 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Ross McKay
G'day,

I've hacked up some syntax highlighting support for SCSS[1] in a fork on
github[2] and Neil at the Scintilla project has accepted it[3]

So, how do I get this into Geany now? Obviously the Scintilla repo is
ahead of the Geany version, however what I have in my Geany fork is
compatible with Scintilla's current head (the lexer is identical and the
.iface uses the same constants numbering).

Should I submit a pull request, or is there another preferred way?

cheers,
Ross

[1] http://sass-lang.com/
[2] https://github.com/webaware/geany/tree/css-scss
[3] http://preview.tinyurl.com/6sdp8em
-- 
Ross McKay, Toronto, NSW Australia
Faced with a choice between the survival of the planet
 and a new set of matching tableware, most people would
 choose the tableware - George Monbiot
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Lex Trotman
On Tue, Jan 17, 2012 at 8:41 PM, Ross McKay ro...@zeta.org.au wrote:
 G'day,

 I've hacked up some syntax highlighting support for SCSS[1] in a fork on
 github[2] and Neil at the Scintilla project has accepted it[3]

 So, how do I get this into Geany now? Obviously the Scintilla repo is
 ahead of the Geany version, however what I have in my Geany fork is
 compatible with Scintilla's current head (the lexer is identical and the
 .iface uses the same constants numbering).

 Should I submit a pull request, or is there another preferred way?

 cheers,
 Ross

Hi Ross,

Geany prefers to use an unmodified Scintilla from that project.
Upgrading Scintilla is not a minor task involving as it does checking
and verification that all Geany settings in all filetypes map
correctly to all Scintilla styles and that all changes have been
handled correctly. Therefore Geany does not update Scintilla very
often, rather when there are significant fixes in Scintilla and/or
significant new features.

The decision to support new languages is also difficult due to the
increase each language brings to the ongoing workload each upgrade.

Although this suggestion has not been run past the Geany developers, I
suggest that you would increase the chances of a new language being
added if you offered to be the language maintainer and support person.
 That is you offer to create and maintain the mapping code and data
for the language each time Scintilla is upgraded, and of course offers
of help with other languages can't hurt, the Geany devs can't be
experts in all languages.

Cheers
Lex



 [1] http://sass-lang.com/
 [2] https://github.com/webaware/geany/tree/css-scss
 [3] http://preview.tinyurl.com/6sdp8em
 --
 Ross McKay, Toronto, NSW Australia
 Faced with a choice between the survival of the planet
  and a new set of matching tableware, most people would
  choose the tableware - George Monbiot
 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Lex Trotman
On Wed, Jan 18, 2012 at 12:46 AM, Nick Treleaven
nick.trelea...@btinternet.com wrote:
 On 17/01/2012 09:59, Lex Trotman wrote:

 Geany prefers to use an unmodified Scintilla from that project.
 Upgrading Scintilla is not a minor task involving as it does checking
 and verification that all Geany settings in all filetypes map
 correctly to all Scintilla styles and that all changes have been
 handled correctly. Therefore Geany does not update Scintilla very
 often, rather when there are significant fixes in Scintilla and/or
 significant new features.


 I think if all is needed is to copy SciLexer.h and the new lexer file, plus
 minor makefile changes, then a patch should be acceptable without upgrading
 Scintilla. We've done this in the past.

Hi Nick,

How does this work without a filetype to support the new lexer?  And
don't we need additions to sciwrappers to map the filetype keys to
scintilla style enums?

Cheers
Lex


 I don't know anything about SCSS however, so can't decide whether Geany
 should support it or not.

 Regards,
 Nick

 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Ross McKay
Lex Trotman wrote:

Geany prefers to use an unmodified Scintilla from that project.
Upgrading Scintilla is not a minor task involving as it does checking
and verification that all Geany settings in all filetypes map
correctly to all Scintilla styles and that all changes have been
handled correctly. Therefore Geany does not update Scintilla very
often, rather when there are significant fixes in Scintilla and/or
significant new features.

I've already done the work required, my fork of Geany has SCSS working
with the version of Scintilla currently used by Geany. The lexer is the
CSS lexer, to which I've added some code for SCSS support. I've added
the necessary filetype data and hacked the CSS tag parser minimally.
SWMBO is already using this in anger :)

If you look at the fork on github[1] you'll see that it's ready to go
right now. I could create a pull request and it'd be ready to merge.

The decision to support new languages is also difficult due to the
increase each language brings to the ongoing workload each upgrade.

Although this suggestion has not been run past the Geany developers, I
suggest that you would increase the chances of a new language being
added if you offered to be the language maintainer and support person.
 That is you offer to create and maintain the mapping code and data
for the language each time Scintilla is upgraded, and of course offers
of help with other languages can't hurt, the Geany devs can't be
experts in all languages.

No worries, I'm not finished with it anyway. I plan to increase support
for SCSS in the lexer, and also add support for Less CSS[2] which is
similar but different. There's already some code out there for both SCSS
and Less which the Komodo team have put together[3] so I know all of
this is possible. And I'd like to refactor the lexer somewhat, so that
it's more manageable and can more easily be maintained. But all that's
for another day, after I get some paid work done.

[1] https://github.com/webaware/geany
[2] http://lesscss.org/
[3] http://preview.tinyurl.com/8y7fvrv
-- 
Ross McKay, Toronto, NSW Australia
Tuesday is Soylent Green day
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Ross McKay
Nick Treleaven wrote:

I think if all is needed is to copy SciLexer.h and the new lexer file, 
plus minor makefile changes, then a patch should be acceptable without 
upgrading Scintilla. We've done this in the past.

I've got it working in Geany now. 11 changed files with 277 additions
and 25 deletions. See the new pull request (I gave in, it's easier to do
that than discuss in email I think).

I don't know anything about SCSS however, so can't decide whether Geany 
should support it or not.

http://sass-lang.com/

Absolutely, Geany should support it :)
-- 
Ross McKay, Toronto NSW Australia
All we are saying
 Is give peas a chance - SeedSavers
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Lex Trotman
On Wed, Jan 18, 2012 at 8:04 AM, Ross McKay ro...@zeta.org.au wrote:
 Lex Trotman wrote:

Geany prefers to use an unmodified Scintilla from that project.
Upgrading Scintilla is not a minor task involving as it does checking
and verification that all Geany settings in all filetypes map
correctly to all Scintilla styles and that all changes have been
handled correctly. Therefore Geany does not update Scintilla very
often, rather when there are significant fixes in Scintilla and/or
significant new features.

 I've already done the work required, my fork of Geany has SCSS working

Which is why I thought you would say yes :)

 with the version of Scintilla currently used by Geany. The lexer is the
 CSS lexer, to which I've added some code for SCSS support. I've added
 the necessary filetype data and hacked the CSS tag parser minimally.
 SWMBO is already using this in anger :)

Independent testing too :)


 If you look at the fork on github[1] you'll see that it's ready to go
 right now. I could create a pull request and it'd be ready to merge.


Might as well, oh you did :)

The decision to support new languages is also difficult due to the
increase each language brings to the ongoing workload each upgrade.

Although this suggestion has not been run past the Geany developers, I
suggest that you would increase the chances of a new language being
added if you offered to be the language maintainer and support person.
 That is you offer to create and maintain the mapping code and data
for the language each time Scintilla is upgraded, and of course offers
of help with other languages can't hurt, the Geany devs can't be
experts in all languages.

 No worries, I'm not finished with it anyway. I plan to increase support

Great, all help is appreciated.

 for SCSS in the lexer, and also add support for Less CSS[2] which is
 similar but different. There's already some code out there for both SCSS
 and Less which the Komodo team have put together[3] so I know all of
 this is possible. And I'd like to refactor the lexer somewhat, so that
 it's more manageable and can more easily be maintained. But all that's
 for another day, after I get some paid work done.

 [1] https://github.com/webaware/geany
 [2] http://lesscss.org/
 [3] http://preview.tinyurl.com/8y7fvrv
 --

In general I'd say it could be added since a complete pull request is
available.  As Nick says its been done before.  I think it is also
getting close to time for a Scintilla upgrade due to accumulating
requests for various features that are part of current Scintilla,
perhaps next release (which will include your changes).  If the
coffeescript proponents get their filetype and sciwrappers ready ...

Cheers
Lex
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Ross McKay
Lex Trotman wrote:

@Ross,

Do you have some SCSS examples for testing?

See attached, acid.css is what Neil Hodgson sent me for testing CSS, and
example.scss has SCSS code including the acid tests modified to show off
some SCSS features (basically, nesting, the nested parent operator,
mixins, interpolation, variables).

Note that the CSS lexer before I touched it didn't handle acid.css
correctly, and still doesn't:

lines 8,15: semicolon in data url breaks highlighting
line 143: | operator isn't handled correctly

I'll be looking at that next time I get a chance.

Also, I just noticed that I *still* have a problem with single-line
comments and highlighting state: comment out a line, press enter twice,
and the comment never ends (is fixed by a reload). I'll fix that
sometime today or tomorrow, and push to my fork, then comment on the
pull request.
-- 
Ross McKay, Toronto, NSW Australia
The chief cause of problems is solutions -Eric Sevareid


acid.css
Description: Binary data


example.scss
Description: Binary data
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-17 Thread Matthew Brush

On 01/17/2012 01:54 PM, Lex Trotman wrote:

[...]

In general I'd say it could be added since a complete pull request is
available.


Pardon the serial post :)

@Ross,

Do you have some SCSS examples for testing?

@All Devs,

Should we make a section on the wiki for code fragments in each
language for testing since none of us use all the languages Geany
supports.

Or should it be a directory in the source?



I think it'd be useful, I know I could use them for the themes. What 
about a separate repository on github or a permanent branch that never 
gets merged in to the main branch (or released) that has a samples 
directory or some such?


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-01 Thread Ross McKay
G'day,

I've hacked up some syntax highlighting support for SCSS[1] in a fork on
github[2] if anyone wants to play with it. It's mostly working, although
it still has a small bug with nesting and doesn't yet support nested
properties (like: font: { weight: bold; size: 1em; })

Once I fix the nesting bug, and maybe the nested properties, I'll submit
the lexer to the Scintilla project so that maybe we can get it
incorporated into Geany proper.

If anyone familiar with SCSS would like to give it a go and let me know
what breaks, please drop me a line.

Crikey, those lexers have some nasty code!

[1] http://sass-lang.com/
[2] https://github.com/webaware/geany/tree/css-scss
-- 
Ross McKay, Toronto NSW Australia
Click me, drag me, treat me like an object
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] SCSS (Sassy CSS) lexer support

2012-01-01 Thread Ross McKay
That nesting bug is fixed now. I'm leaving the nested properties alone
as it isn't used here and it looks too hard for my addled brain to
deal with today.
-- 
Ross McKay, Toronto, NSW Australia
Yeah, you just take your pill, and everything will be alright
- Everclear
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel