Sublime Forum

Custom auto completion plugin

#1

Hallo,
I’m new to sublime plugin development. I have some experience in developing plugins for eclipse and IntelliJ and I’m really impressed by the performance of Sublime and I hope to make it work perfectly with my language.
I have a project which contains many large files written in a groovy dsl. The files look like this:

DEFINITION_A {
       DEFINITION_B
       DEFINITION_C
}

and in another file:

DEFINITION_B {
     ....
}
DEFINITION_C {
     ....
}

My first goal is to auto complete all available definitions in all files. What is the right way to do that. Can I override the autoComplete command or is there a way to contribute completions? Thank you for any help and code examples,
Regards, Sebastian

0 Likes

#2

For the documentation on auto-completion you can have a look here : sublime-text-unofficial-document … tions.html

For example you can search package control (sublime.wbond.net/) for plugin doing autocompletion and check their code.
One simple example I found : github.com/cj/sublime/blob/mast … letions.py

0 Likes

#3

Check out https://sublime.wbond.net/packages/All%20Autocomplete, maybee that will give you a hint

0 Likes

#4

Thank you very much, exactly what I needed

0 Likes