Le 17/01/2013 22:00, Thomas Martitz a écrit :
Am 17.01.2013 21:28, schrieb Lex Trotman:
On 17 January 2013 23:02, Sayth Renshaw flebber.crue@gmail.com wrote:
Hi
[...]
Not sure if I have missed something Ruby specific
Hi,
Well, sort of, or rather Geany has missed something, Ruby specific support for indenting :)
Geany autoindent is almost language independent, it knows how to:
- go to the same indent as last line
- indent and unindent on { and }
- as a special case only, indent on : in Python
None of these will work for Ruby IIUC.
What it needs is for someone to specify the algorithm, and to provide a plugin that implements it (such language specific stuff shouldn't be in core)
I disagree.
This is something that ought to be in the core, really. Language support is a core feature of Geany (and any IDE). It should work out of the box and not reside in disabled-by-default extensions. Especially if python can have its special case in the core.
Nope, I don't think so. Actually I wish we support (someday) "filetype plugins", e.g. a plugin that provides highlighting, tag parsing and any other kind of useful language-specific features. Maybe those plugins should indeed be automagically loaded when opening a file using that plugin's language, but it'd be great if the features where in a separate entity.
Why? Well, there are many reasons:
* It would use less resources: even though each filetype would probably use more resources because of the plugin and loading thingie, nobody uses 100 languages at the same time, nor in the same Geany run.
* Third parties could provide full-featured additional languages. This would be very good, because currently if you want a new lexer (highlighting) or tag parser (symbols) it ought to live in Geany's core. This is not really a problem for C, C++, Java or other popular languages, but this requirement is a pain for less used languages -- honestly, what percentage of Geany uses will use COBOL? Haxe? Verilog? or even Haskell or Erlang? some of course, but few. And I only spoke of languages currently supported by Geany, not all the languages one might want to use but that aren't widespread.
* When something is specialized, it's often better for that particular feature. What I mean is that a plugin that focuses on say, Python support, could provide awesome features that only make sense with Python and no other language. And it'd be easier to Python users to improve the Python-specific plugin rather than having to deal with the whole Geany codebase.
* and probably other things I don't think of right now.
What else, if not language support, belongs to the core? And since when is handling/enabling indentation a plugin-thing?
As said in the other mail, I agree that in the case of indentation there should be a generic thing in Geany (indentation being a common thing for most languages). But in a perfect world, what would belong to the core would be the text edition things, and only the common part for each and every language, e.g. a platform that would make the support of a new language as simple as possible.
But I won't dream, we aren't there (yet) ^^
Regards, Colomban