digitalmars.D.learn - How to make autocompletion for IDE?
- unDEFER (33/33) Jul 25 2017 Hello!
- Andrea Fontana (4/5) Jul 25 2017 I think you should use/contribute to DCD project
- Andrea Fontana (3/8) Jul 25 2017 Sorry, this is the right link:
- unDEFER (6/16) Jul 25 2017 Yes this project where "Not working: UFCS suggestions and That
- Andrea Fontana (4/9) Jul 25 2017 If you want to add UFCS suggestions to DCD it would be useful for
- unDEFER (3/6) Jul 25 2017 Thank you, I will think. But if it was easy, authors self would
- Andrea Fontana (3/10) Jul 26 2017 Did you try with [1]?
- unDEFER (2/4) Jul 26 2017 Thank you, interesting. But I'm afraid it is not enough.
- Basile B. (5/22) Jul 25 2017 I think that you underestimate the amount of work needed and your
- unDEFER (10/14) Jul 25 2017 No, with feature like
Hello! I have written my text editor with highlighting, and now I want to add IDE features to it. I want to make autocompletion, but not only complete members of class/struct, but also all functions which maybe used with type, if the first argument of the function is this type. I.e. in "a".fromStringz() style instead of fromStringz(a). For it I will take editable now sources, add to it lines like this: foreach(d; __traits(allMembers, std.string)) { if (is(typeof(mixin("\"abc\"."~d~"()")))) pragma(msg, "\"abc\"."~d~"()" ); } So it will print all methods which can be called for strings as "abc".function(). And I want to compile this file with options "-c -o-". The problem that compilation for files with avarage count of imports may take e.g. 7 seconds.. 7 seconds is too long to wait autocompletion. But compiler really do this "task" with autocompletion requests very fast. And I think how to implement the next: Add the task to some other file task.d. import it to the first file with mixin(import("task.d")). Change syscall open() to my function which if will see that it opens "task.d" waiting the time when user will ask autocomplete (press Ctrl-space), and then write the task to "task.d" and continue execution of compiler... The problem that I see in this conception is that seems not possible write such import which will be imported only when compiler starts handle templates and simultaneously in the place where will be accessed all local variables of a function. Any ideas?
Jul 25 2017
On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:Any ideas?I think you should use/contribute to DCD project https://github.com/dlang-community/DCC Andrea
Jul 25 2017
On Tuesday, 25 July 2017 at 10:23:33 UTC, Andrea Fontana wrote:On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:Sorry, this is the right link: https://github.com/dlang-community/DCDAny ideas?I think you should use/contribute to DCD project https://github.com/dlang-community/DCC Andrea
Jul 25 2017
On Tuesday, 25 July 2017 at 10:24:13 UTC, Andrea Fontana wrote:On Tuesday, 25 July 2017 at 10:23:33 UTC, Andrea Fontana wrote:Yes this project where "Not working: UFCS suggestions and That one feature that you REALLY needed".. I want to have all features that I really need :-) But If I will not find how do UFCS suggestions fast, I probably will use DCD for all other things..On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:Sorry, this is the right link: https://github.com/dlang-community/DCDAny ideas?I think you should use/contribute to DCD project https://github.com/dlang-community/DCC Andrea
Jul 25 2017
On Tuesday, 25 July 2017 at 10:32:11 UTC, unDEFER wrote:Yes this project where "Not working: UFCS suggestions and That one feature that you REALLY needed".. I want to have all features that I really need :-) But If I will not find how do UFCS suggestions fast, I probably will use DCD for all other things..If you want to add UFCS suggestions to DCD it would be useful for your project and all other IDEs too! Andrea
Jul 25 2017
On Tuesday, 25 July 2017 at 10:35:14 UTC, Andrea Fontana wrote:If you want to add UFCS suggestions to DCD it would be useful for your project and all other IDEs too! AndreaThank you, I will think. But if it was easy, authors self would do it :-)
Jul 25 2017
On Tuesday, 25 July 2017 at 10:45:38 UTC, unDEFER wrote:On Tuesday, 25 July 2017 at 10:35:14 UTC, Andrea Fontana wrote:Did you try with [1]? [1] http://forum.dlang.org/post/okktlu$2bin$1 digitalmars.comIf you want to add UFCS suggestions to DCD it would be useful for your project and all other IDEs too! AndreaThank you, I will think. But if it was easy, authors self would do it :-)
Jul 26 2017
On Wednesday, 26 July 2017 at 07:41:20 UTC, Andrea Fontana wrote:Did you try with [1]? [1] http://forum.dlang.org/post/okktlu$2bin$1 digitalmars.comThank you, interesting. But I'm afraid it is not enough.
Jul 26 2017
On Tuesday, 25 July 2017 at 10:32:11 UTC, unDEFER wrote:On Tuesday, 25 July 2017 at 10:24:13 UTC, Andrea Fontana wrote:I think that you underestimate the amount of work needed and your solution which is to use the compiler with -o- looks bad. What you really need is a compiler front-end which is basically what libdparse + DSymbol are. DCD uses them.On Tuesday, 25 July 2017 at 10:23:33 UTC, Andrea Fontana wrote:Yes this project where "Not working: UFCS suggestions and That one feature that you REALLY needed".. I want to have all features that I really need :-) But If I will not find how do UFCS suggestions fast, I probably will use DCD for all other things..On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:Sorry, this is the right link: https://github.com/dlang-community/DCDAny ideas?I think you should use/contribute to DCD project https://github.com/dlang-community/DCC Andrea
Jul 25 2017
On Tuesday, 25 July 2017 at 10:42:40 UTC, Basile B. wrote:I think that you underestimate the amount of work needed and your solution which is to use the compiler with -o- looks bad. What you really need is a compiler front-end which is basically what libdparse + DSymbol are. DCD uses them.No, with feature like auto func() and void templ(T)(T a) if (is(a)) {} It is impossible to consider all it by myself. It means write the second compiler. So I just want to use the ready compiler.
Jul 25 2017