Javascript Intellisense in IDE - javascript

How does Intellisense work in IDEs for JavaScript such as Webstorm or Eclipse?
Where do the suggestions come from?
Can we write the code to make the suggestions more accurate?

Please see http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/ for some hints on improving JavaScript code completion in WebStorm. In general: suggestions are taken from index that is built for all .js and d.ts files available in the project/set up as libraries. To make the completion better, you can try using JSDoc annotations/typescript definition stubs

In Eclipse you can write plug-ins which use the org.eclipse.wst.jsdt.ui.javaCompletionProposalComputer extension point to contribute additional Content Assist proposals.
Eclipse gives you access to an Abstract Syntax Tree of the code to help with analyzing the source.

Disclaimer, I'm the author of tern.java
I suggest you that you try tern.java by starting to read Getting Started

Related

How to configure vim for auto complete in Python file and Javascript file too

I work with vim for 2 years in cpp, and untill today, i used to auto complete my code with ctags. It wasnt great, but enough for my needs.
Currently, i work with python and Javascript and i am looking for good tool which give me support for both languages.
I tried Jedi for python and i was great, but it has support only for python, so it cant help me for Javascript anf bash.
Any idea how can i configure my vim to support multiple languages?
My vimrc on: https://github.com/reubinoff/DotFiles/blob/master/.vimrc
Thanks
Although its highly opinionated I would highly recommend you checkout coc.nvim (https://github.com/neoclide/coc.nvim) which you can then use to install extensions for the languages you want to use, which then provide you with autocomplete and other features. A list of extensions for coc.nvim can be found here: https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions#implemented-coc-extensions
The plugin deoplete supports different languages via submodules. So also Javascript and Python etc.
Thanks!
I tried phd recommendation. YouCompleteme + tern_for_vim is really answer my needs.

What Javascript IDEs can display code hints for Three.js?

I need to find a Javascript IDE or editor that can display code hints for external files such as Three.js. Any help would be appreciated.
Disclaimer, I'm the author of the tern.java.
If you use Eclipse, I suggest you that you install tern.java 0.10.0 (not released) which provides a tern support for three.js with completion for three.js :
If you are using other JavaScript Editors like Emacs, Vim, Sublime, you can use the tern plugin tern-threejs
I would recommend WebStorm
Get the Personal Licence if it's just for yourself for personal use, you can try for 30 days.

Eclipse plugin for javascript development in jsp?

I'm used to Intellij to develop javascript but today (or in a short while), I'll need to develop it in Eclipse. A quick google search gave me JSEclipse and JSEditor.
I'm writing JS in JSPs, not necessarily in .js files (even if I might, too).
Among important criterias :
ctrl + click navigation between function declaration/calls
variable hightlighting
Synthax correction
Usual stuff I find in java development and that would be useful in javascript.
Hope this question isn't to general/subjective.
So what should I use ?
Thanks in advance
Try using Aptana Studio plugin for Eclipse. It contains all you need to work with Web Technology.
[http://marketplace.eclipse.org/content/aptana-3#.U_2OuWOVLIU][1]
This will be helpfull. I got solution by this

Are there JSDoc files for Firefox XPCOM?

While I know much of XPCOM is implemented in C++, it would still be great to have JavaScript stubs with empty functions, constants, and JSDoc. These could be used to support code completion, inspection, quick doc, and other features of IDEs like WebStorm (IntelliJ).
It would be great if this just existed somewhere (but I haven't found it). Another approach would be to try and generate them from the IDL, but I haven't found a a way to do that either. I have question on that at Are there JSDoc files for Firefox XPCOM?.
I wrote a PHP script once, which generates PHP stubs from PHPDoc available at http://www.php.net for providing code assist in Eclipse PDT. You can use similar approach to generate JSDoc from XPCOM Doxygen.

How can I help Google's Closure Compiler optimize my JavaScript code?

I've been tinkering with Google's Closure Compiler and was able to get everything compiling perfectly using the advanced compilation option. How can I get the best compilation results from my code?
Read about Advanced compilation.

Categories