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
On Tue, Jan 17, 2012 at 8:41 PM, Ross McKay rosko@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
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.
I don't know anything about SCSS however, so can't decide whether Geany should support it or not.
Regards, Nick
On Wed, Jan 18, 2012 at 12:46 AM, Nick Treleaven nick.treleaven@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
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.
On Thu, Jan 19, 2012 at 3:46 AM, Nick Treleaven nick.treleaven@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
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.
Absolutely, Geany should support it :)
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
On Wed, Jan 18, 2012 at 8:04 AM, Ross McKay rosko@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
[...]
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?
Cheers Lex
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.
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