On 29 August 2016 at 22:38, Thomas Martitz kugel@rockbox.org wrote:
Am 29.08.2016 um 14:23 schrieb Lex Trotman:
This adds per use case hooks to plugins, which then became part of the stable API. I don't think that we have to codify every single use case of tags into the plugins. That's just making it harder (maybe impossible?) to change or add use cases. The point of this proposal is to change and add use-cases that are not currently possible with the current plugin API. But instead of each use-case generating its own piece of API and its own infrastructure, the point of the FT-plugins proposal is to provide a common infrastructure and approach for all filetype specific use-cases, those needed for currently suggested uses, indentation, clang based styling and symbols, and as framework for future use-cases we either havn't thought of, or havn't a concrete intention to add immediately.
I thought we agreed that plugin should simply provide tags to Geany/TM
This proposal is about many types of filetype specific functionality, not just tags. Tagmanager will not help in any way with indenting Haskell, or even C++.
4 of 5 of the proposed features are strictly tag-related. And Geany can do all of them already, it's just that the current implementation leaves things to be desired so there is the idea to let plugins improve upon them.
Well, 3 out of 6 but whos counting :)
Certainly 1) showing symbols in the symbol list, 2) autocomplete and 3) calltips are currently available to a degree in Geany. But highlighting, build commands and build result handling are not. But to be able to do 2) and 3) accurately needs more knowledge of each language semantics than is currently available in Geany or tagmanager.
I disagree with the proposed solution for those 4, because they are offloading logic on a per feature basis to plugins, only because Geany isn't capable at the moment. If Geany was capable, then there could be 1 solution for the 4 features and less complexity in each plugin (and we know the quality of plugins varies a lot so they should have little complexity as possible).
Encoding the knowledge of language semantics into Geany, for each language supported, is going to make autocomplete and calltip code look like c.c. Its not the way to go.
The solution I have in mind simply allows plugins to pass tags to Geany which they parsed with more advanced code. The tags itself would advanced too, to allow for the improvements current TM+ctags can't offer. Symbol tree, calltips, autocompletion, jump-to-decl can all be improved based on the advanced tags.
Well, again you are encoding language semantics into Geany, for example for C++ that means autocompletion and calltips need to handle 1) local symbol scopes, 2) member functions being in the scope of the class, even when they are not 3) argument dependent lookup 4) template expansion lookup and 5) handling of template parameter based typing. These are hard, just ask the GCC and clang guys. And every user of Geany will have to pay the cost of the code they don't use, unless they use C++.
Then for a multidispatch language like Julia you need to handle overloading in an even more subtle way than C++ overloading.
And why re-implement these language specific subtle and difficult features in Geany when more and more languages are providing libclang like libraries to do it for us, accurately and up to date with the language.
Cheers Lex
Best regards. _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel