Code Monkey home page Code Monkey logo

Comments (6)

maralla avatar maralla commented on July 22, 2024

#32 should fix the problem.

from completor.vim.

markonm avatar markonm commented on July 22, 2024

I still can't get it to work. I tried to use let g:completor_node_binary = '/usr/bin/node' setting but it doesn't help. Is there any other setting I should try?

from completor.vim.

maralla avatar maralla commented on July 22, 2024

Upgrade completor.vim to the latest commit and run make js again. And use the following code as the .tern-project content:

{
  "plugins": {
    "node": {},
    "es_modules": {}
  },
  "libs": [
    "ecma5",
    "ecma6"
  ],
  "ecmaVersion": 6
}

Then edit a js file test.js, enter the following code:

a = [1, 2, 3]
a.

after entering a. the completion popup should be shown.

from completor.vim.

markonm avatar markonm commented on July 22, 2024

I tried, but it doesn't work. I also tested on newly installed Ubuntu 16.04 it doesn't work there either. I only get buffer and path completion.

from completor.vim.

maralla avatar maralla commented on July 22, 2024

Go to <root directory of completor.vim/pythonx/completers/javascript and run node tern_wrapper.js. Is there any exceptions?

from completor.vim.

markonm avatar markonm commented on July 22, 2024

I ran it and got the following:

/home/m/.vim/plugged/completor.vim/pythonx/completers/javascript/tern_wrapper.js:67
      let def = readJson(found);
      ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

I had node v4.2.6 installed. After that I installed v6.9.1, and now tern completions work as expected.
So the problem was my old version of node.

I'm sorry for the noise. Thank you for your patience and help.

from completor.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.