K
K
Konstantin2016-10-09 16:35:46
atom
Konstantin, 2016-10-09 16:35:46

How to add your own function to autocomplete?

Good day, there is this: 2ca393c9116748f5a33b33e7fe3c8c48.pngLet's analyze the getElementById() function as an example;

  1. There is a function icon at the beginning, not a snippet
  2. Before the name of the function, you can see what it returns (in this case, it is an Element object)
  3. This autocomplete is called if and only if it is called as a method of the corresponding object (Document, HTMLElement) - that is, these functions that are available through autocomplete have a certain namespace. If we draw an analogy with a snippet, then it is always available, regardless of the context
  4. The parameters specify the name (id), and what value it expects to receive (string)
  5. At the very bottom of the block there is a short annotation on this function with a link

Question: how to add your own functions to Atom that would have all of the above features compared to snippets?
Thanks for your answers!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question