Can I change the cursor position after a completion is inserted ?

Say the user selects the function foo(), Can I get adjust the cursor after the string is inserted so that the cursor ends up here: foo(<caret>)?

1 Like

You can attach a hint method to a completion item (which can be an object, not just a string). This will be called when the completion is picked, and you can have it first insert the text and then call setCursor.

2 Likes

Thanks, works fine :slight_smile:

I work with V6 and couldn’t find hint method you mentioned. Can you tell me what a hint method is?

In version 6 this would be done with the apply field on the completion object.

1 Like