GithubHelp home page GithubHelp logo

Autocompletion not inserting code about ideu HOT 50 CLOSED

fredvs avatar fredvs commented on June 4, 2024
Autocompletion not inserting code

from ideu.

Comments (50)

fredvs avatar fredvs commented on June 4, 2024 1

that the word would not be selected in the end
and that the completion list would hide when we double click

Should be fixed in commit 412a07e

from ideu.

fredvs avatar fredvs commented on June 4, 2024 1

Hello.

Yes. I am not used to it, but it makes sense to me.

Ok, so let do like this, if Ctrl+Space was used, 2xClick will insert, for a method, only themethod(

If it was 2XCliked from the auto-list of lamp-icon, all the method with parameter will be added.

I released ideU 2.2.0 : https://github.com/fredvs/ideU/releases

Many, many thanks Johann for all your perfect ideas, bug fixes and kind support.

Fre;D

from ideu.

fredvs avatar fredvs commented on June 4, 2024

OK, I will check that.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

If I click on it, it doesn't insert the full name in the code.

Ha, yes, indeed, this was the result of hard discussion in MSE mailing list.
At the end Martin does convince us, for him a good ide dont have to touch to code.
Ok to give infos in a list but not to paste code.

Anyway maybe we could think to add possibility to insert code.
But maybe.

Also it displays in the commandor "showsourceitems(edit.editpos)".

Hum, sorry, this one I do not catch.
Where in the commandor?

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Well Martin is not obliged to use the code completion.

image

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Sorry but how do you get showsourceitems(edit.editpos) in Commandor?

Could you tell the operations you did?
I cannot reproduce it.
(Or maybe you discover something than I never seen).

EDIT
Ooopps ok, I see, I will study it.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Also it displays in the commandor "showsourceitems(edit.editpos)".

It is the command used by Shift + Space.
I agree it is not needed, I did use for debugging, thanks to note it, I will remove it.

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Ok.

So I suppose the code completion is not for this release.

Something else though, the list is methods is not formatted (it contains $ symbols):
image

The font is small by the way, which is kind of ok for this one.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

So I suppose the code completion is not for this release.

I fear that no for insert (even if I already begin the work).

Something else though, the list is methods is not formatted (it contains $ symbols):

Yes it is the universal format used by Martin.
I agree if we go foward for code completion, it could be adapted for each prog language.

The font is small by the way, which is kind of ok for this one.

No, no, no the good news is that the size of the list is sized now with the font height.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

If I click on it, it doesn't insert the full name in the code.

OK in commit 035581c : if you 2xclick on a item it will be pasted where is the cursor.

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Gonna check that

from ideu.

circular17 avatar circular17 commented on June 4, 2024

So I suppose the code completion is not for this release.

I fear that no for insert (even if I already begin the work).

OK in commit 035581c : if you 2xclick on a item it will be pasted where is the cursor.

Seems it was possible in fact. I tested it, that's good, though you need to first delete the current word before inserting, like you did with CTRL-T. Otherwise you get repetitions of parts of the word.

Yes it is the universal format used by Martin.
I agree if we go foward for code completion, it could be adapted for each prog language.

Hmm to me that's more like an assembler label. Anyway I suggest to format it with brackets and commas, as it is what most languages use. If you ever come across a language that doesn't use that, you can still customize for this language.

Something else: if I press Ctrl-Shift-Space to get info about parameters, it will display the list of procedures in the Pascal format for one second, and then replace the content of the completion drop down with the content for Ctrl-Space.

No, no, no the good news is that the size of the list is sized now with the font height.

Cool!

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Something else: if I press Ctrl-Shift-Space to get info about parameters, it will display the list of > procedures in the Pascal format for one second, and then replace the content of the completion drop down with the content for Ctrl-Space.

Once again, sorry but I cannot reproduce it.
Maybe a video will help.

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Here it is:
ideu_ctrl_shift_space

I am just pressing Ctrl-Shift-Space once.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Could you try this, click on the lamp icon, try the same thing with lamp on and off to see if it has something to do with the auto list.

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Indeed, I turned on the lamp and then off again. And now it doesn't display the second list. If I turn back on the lamp, the bug happens.

By the way, what is this lamp about?

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Indeed, I turned on the lamp and then off again. And now it doesn't display the second list. If I turn > back on the lamp, the bug happens.

OK, I can reproduce it, ok, I will fix it.

By the way, what is this lamp about?

When on, a list similar to CTRL + space will appear when you are typing, showing all what could be written.

It must be set to pause if using CTRL + space or CTRL + shift + space .
I will fix it tonight.

Thanks to note it.

from ideu.

circular17 avatar circular17 commented on June 4, 2024

By the way, the lamp icon is displayed as disabled when the program starts, even if it is enabled.

Other problem, when the completion list appears, if I press a key just at this moment, the input is lost, i.e. the character is not added to the code.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

OK, I will check this tonight.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

By the way, the lamp icon is displayed as disabled when the program starts, even if it is enabled.

Yes, thanks to note it, I forget to enable it after changing icon behavior yesterday, I will fix it tonight.

Other problem, when the completion list appears, if I press a key just at this moment, the input is > lost, i.e. the character is not added to the code.

Hum, ok, sometime it appends indeed, I will see what can be done, it is because the list take focus just at moment you typed.

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Hum, ok, sometime it appends indeed, I will see what can be done, it is because the list take focus just at moment you typed.

Maybe redirect key event?

Note: the word is "it happens" not "it appends". Appending means adding at the end of a list.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

OK, all should be fixed with commit f6e127c

from ideu.

circular17 avatar circular17 commented on June 4, 2024

That's fine.

Remains to replace the current word instead of inserting. As I said previously you could do as you did for CTRL-T to remove the word and then insert.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Remains to replace the current word instead of inserting.

Should be fixed with commit 9787fdf

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Ok we're getting there.

One final suggestion:

  • that the word would not be selected in the end
  • and that the completion list would hide when we double click

After that, I guess I have no other suggestion for next release.

Regards

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Ok I thought that would be it but when one insert a procedure/function definition, it should either:

  • format it, so that we can navigate with Ctrl-ArrowLeft and Ctrl-ArrowRight.
  • or insert just the name of the function and one bracket.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Ok I thought that would be it but when one insert a procedure/function definition, it should either:

* format it, so that we can navigate with Ctrl-ArrowLeft and Ctrl-ArrowRight.

* or insert just the name of the function and one bracket.

I fear that formatting procedure/function definitions will be for after the next release.

;-(

from ideu.

circular17 avatar circular17 commented on June 4, 2024

No problemo

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Ok I thought that would be it but when one insert a procedure/function definition, it should either:

* format it, so that we can navigate with Ctrl-ArrowLeft and Ctrl-ArrowRight.

* or insert just the name of the function and one bracket.

I will see if I find some resource to jump into that tonight.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Sorry, I give it up for now.
I dont really catch if you want to paste things from Ctrl+Space or Ctrl+Shift+Space.

from ideu.

circular17 avatar circular17 commented on June 4, 2024

No problemo. Have a good evening/night

from ideu.

fredvs avatar fredvs commented on June 4, 2024

insert just the name of the function and one bracket.

In commit 813926b it has this:

When using Ctrl+Space, 2xclick on the list inserts just the name and one bracket if there is a '$' symbol.
Otherwise it just inserts the name.

Using Ctrl+Shift+Space only gives info, 2xclick is disabled (for the moment).

Maybe we can let it like this for this release.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

And I even think that adding the bracket is too much and should be added manually.

But that is a very little detail.

Good night and many thanks for your release.

Fre;D

from ideu.

circular17 avatar circular17 commented on June 4, 2024

That's nice. I noticed yet another thing. After doing Ctrl+Space, when I click an item in the autocompletion list, it scrolls down to the bottom, and I end up clicking another item. I suppose this is the case because the last item of the list is selected by default.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

OK, I will check that.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

OK, fixed in commit 1cbdca6

Thanks to note it.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

I am still not sure that adding always a '('when '$' is found is a ok because if it is a class , it should add a '.' .

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Do you have an example?

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Sans titre

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Done with lamp on.

video

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Hello.

In commit d03f42f, the list is formatted in Pascal flavour.

autocomplete2

autocomplete3

autocomplete4

Your advice is welcome!

from ideu.

fredvs avatar fredvs commented on June 4, 2024

And in commit e284b47:

autocomplete5

autocomplete6

OK, now I really stop.

Have lot of fun!

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Sans titre

Oh so the $ sign was used for "." and for "(". Yeah that's ambiguous.

Looks like you progressed a bit on that, I will have a look.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Oh so the $ sign was used for "." and for "(". Yeah that's ambiguous.

Huh, even more ambiguous...
application() is a procedure too!

from ideu.

circular17 avatar circular17 commented on June 4, 2024

Oh ok indeed I saw that. Then it is fair that the autocomplete would add a parenthesis.

To avoid that, I suppose you could remove the "()" when there are no parameters because anyway it is not necessary in Pascal.

Anyway I think it is quite convenient now.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

To avoid that, I suppose you could remove the "()" when there are no parameters because anyway it is not necessary in Pascal.

Are you talking for case like this?

Sans titre

Hum, ok, but, I already receive warnings in uos forum that said that the good usage in Pascal is to use "()" if no parameters are used for a procedure or function.

So I did add "()" fro each method without parameter, for example:

function Tuos_Init.loadlib(): cint32;

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Re-hum, did you try last commit because it should not have problems with methods without parameters.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Ok, ok, I get it, you want avoid to oblige people to remove the '()' if they dont want to use a method vs a class.
And the example of application is a perfect example.

[EDIT] By the way, apart for application, I did not find any other example.

OK, I will remove the '()'.

from ideu.

fredvs avatar fredvs commented on June 4, 2024

Sorry, I am back again...

OK, to remove '()' but then also the ';' ?
So, if a method without parameter is added via the auto-complete list, only the name will be added.

Are you ok with the behavior of now, for methods with parameters, all the methods with kind of parameters is added, with the comas, like this?

video

from ideu.

circular17 avatar circular17 commented on June 4, 2024

OK, to remove '()' but then also the ';' ?
So, if a method without parameter is added via the auto-complete list, only the name will be added.

Sounds good

Are you ok with the behavior of now, for methods with parameters, all the methods with kind of parameters is added, with the comas, like this?

Yes. I am not used to it, but it makes sense to me.

from ideu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.