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: