Atom-ternjs doesn't work in CoffeeScript


#1

I am using Windows 10 with latest version of Atom(0.209) and atom-ternjs(0.6.4). atom-ternjs works well in JavaScript file, but not work in CoffeeScript.

My test.coffee:

fs = require 'fs'

user =
  name: 'jysperm'

When I type fs. or user., It did not happen anything, Nor trigger suggestions of autocomplete-plus.

My .tern-project:

{
  "libs": [
    "browser",
    "ecma5",
    "ecma6",
    "jquery"
  ],
  "loadEagerly": [],
  "plugins": {
    "node": {}
  }
}

My config.cson:

  "autocomplete-plus":
    confirmCompletion: "tab"
  "atom-ternjs":
    coffeeScript: true

My other packages:

atom-beautify@0.28.5
atom-ternjs@0.6.4
file-icons@1.5.7
git-diff-details@0.18.0
git-plus@5.1.2
git-projects@1.14.1
language-jade@0.4.0
line-diff-details@1.1.1
line-ending-converter@1.1.0
linter@0.12.7
linter-coffeelint@0.3.2
my-github-profile@0.2.0
react@0.12.0
remote-sync@3.1.2
sloc@0.1.3
todo-show@0.13.0
wakatime@4.0.9

#2

Ternjs was never intended to work with CoffeeScript in the first place. See the discussion on the ternjs repo: https://github.com/marijnh/tern/issues/226


#3

Thanks, atom-ternjs provided a coffeeScript option, So I thought it might supports CoffeeScript.


#4

Oh right, don’t know why it’s like that. Maybe it switch to tern-coffeescript when enabled, but given tern-coffeescript was just a proof of concept and was not updated since 2 years I doubt it even works.


#5

Definitely need to remove that option. Sorry for that :smiley: