Sublime Forum

Detect current selected autocompletion option

#1

Hello,

I’d like to display additional information about an autocompletion option (e.g. the method’s documentation).

I’m thinking of displaying a popup or opening a panel window with the information about the currently selected option. The problem is, I can’t find a nice way to determine what that is. This topics says you can get an event when the completion is executed: https://forum.sublimetext.com/t/event-on-text-command-commit-completion-command-text/16072/1. I’m wondering if there’s a similar one to show the current selected completion.

An example:

https://camo.githubusercontent.com/fb2ee8ecce789f084d3c9416b5e56737da2c1612/687474703a2f2f692e696d6775722e636f6d2f524c71765833412e706e67

Can I detect that the forEach method is currently being selected?

If not, is there another way I can accomplish what I’m trying to do?

Thanks for your time.

0 Likes

#2

It seems like the API doesn’t allow for this. Does anyone have ideas for a workaround?

0 Likes