code completion for js?
Could typescript.java provide also code completion for js-files (if /typings is installed for that module). Actually it only works if js file is renamed to jsx or ts. So code completion also works for jsx (without renaming to tsx), but it does not work for js-files. I cannot rename all other js files but want to have code completion when using es6-module.
no need for this. I can use Tern.java.
Could typescript.java provide also code completion for js-files
Yes it should work. If it doesn't work, it's perhaps your project has JSDT nature. If I rememeber you must activate that with TypeScript preferences (from global / window preferences)
code completion only works if I rename my js-file to a ts-file.
For js-files, I have no code completion.
I have this settings:
- Preferences->..->Typescript->"Use Salsa as JavaScript Inference" (enabled)
- Typescript.java 1.4
- JBoss Tools Java Standard Tools provides an adapter to Tern.java project. version 3.8
- enabled tern-repository (Preferences->..->Tern->Development->Repository): EcmaScript 6, es_modules, Browser, Browser_extension, Gulp, Node.js, Outline, Webpack
- Eclipse Oxygen.1a Release (4.7.1a)
My .tern-config:
{
"plugins": {
"guess-types": {
},
"outline": {
},
"webpack": {
},
"es_modules": {
},
"node": {
},
"gulp": {
},
"browser-extension": {
},
"angular": {
}
},
"libs": [
"ecma5",
"ecma6",
"browser"
]
}
My "ts.eclipse.ide.core.prefs" from within .settings-directory:
eclipse.preferences.version=1
nodeJSPath=/usr/local/bin/node
useNodeJSEmbedded=false
typeScriptBuildPath={"src/js/tsconfig.json"\:{}}
When editing a js-file, I have no code completion for any kind:
- No default Proposals
- No template Proposals
- No basic Proposals
- No tern completion Proposals
- No typescript Proposals
How can I force to have code completion with js-files the same as I have with ts-files?