angelozerr / tern-node-express

A Tern plugin adding support for express web application framework for node.
http://expressjs.com/
MIT License
56 stars 4 forks source link

what's the right install location for vim ? #17

Open lookforit opened 8 years ago

lookforit commented 8 years ago

I use tern_for_vim and youcompleteme for code auto-complete. I installed tern-node-express in ~/.vim/bundle/tern_for_vim/node_modules,but object members(app.set) is not listed in the menu .

Did I install it correctly?

angelozerr commented 8 years ago

If you have a tern folder ~/.vim/bundle/tern_for_vim/node_modules/tern-node-express/node_modles/tern, try to remove it at hand.

lookforit commented 8 years ago

yes,it seems working partly.The member functions of app can be listed out after dot typing. But the res 's member functions still don't come out.

Viterzgir commented 7 years ago

I'm also have problem with tern-node-express. I can't figure out why autocomlete is not working in my instalation. Anyone know how I can see log or some debug information?

thejmazz commented 7 years ago

I was able to get it working with YouCompleteMe (and no tern_for_vim) - I had to delete tern from tern-node-express's node_modules as per above:

rm -rf ~/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern-node-express/node_modules/tern

Also this is my ~/.tern-config:

{
  "plugins": {
    "node": {},
    "node-express": {}
  }
}

See my Dockerfile for the complete build.

angelozerr commented 7 years ago

I would like to try to update package.json with peerDependencies to avoid this problem.

sirusdas commented 6 years ago

Hello, .tern-config code is

{
  "plugins": {
    "node": {},
    "node-express": {},
    "es_modules": {},
    "angular": {}
  },
  "libs": [
      "ecma5",
      "ecma6",
      "browser",
      "underscore",
      "jquery"
    ],
    "ecmaVersion": 6
}

I have node project installed in other directory where i have created .tern-project file and added the same code above. Also installed tern and tern-node-express in both ~/.vim/bundle/tern_for_vim/node_modules/tern-node-express/ and in my project direcory node_modules has both tern and tern-node-express

I still have no success in using express. Can anyone help?

Luffy4321 commented 5 years ago

I use tern_for_vim and youcompleteme for code auto-complete. express cannot work correctly。 my pc is MacBookPro14,3 macOS Mojave。 How to install it correctly?Thanks in advance!

jabby commented 5 years ago

Hello @Luffy4321 I don't know how to install tern_for_vim There is an alternative with language server. One of my friend use this config. https://github.com/charlyx/vim-config/blob/master/init.vim Maybe it will help you for express completion.