Sublime Forum

Sublime Text 3: Netbeans-like autocompletion as you type

#1

I’ve just purchased ST3 beta version, the new “GoTo Symbol in Project” was what I was missing in ST2.

Now, here is my question: wouldn’t be possible, having already all symbols in project already indexed, to provide them in the native autocompletion functionality, so that we can have suggestions not only of symbols in the current open document but, generally, coming from all over the project.

Any thoughts?

0 Likes

#2

Never used NetBeans, but I know it’s an IDE, so I assume it does some analysis of the code to build it’s auto complete list. The GoTo Symbol in Project works the same as GoTo symbol in a view. That is, it places entries into that list based on the scope being applied. So a plugin, such as SublimeCodeIntel, would still have to perform context analysis to create the proper completion list.

Could this be built into the core? Maybe. Will it? only jps (or one of the other members of the ST team) knows. Could a plugin developer do it? Not any better than things like SublimeCodeIntel. It may be nice/easier to leverage the indexed symbols, rather than parsing the files for symbols yourself. However, with the current API, you must specify the full symbol you would like to look up. There aren’t any (or I haven’t found any) wildcard characters. We’ll see what future iterations of ST3 brings with regards to the API though.

0 Likes