Coder Social home page Coder Social logo

When vim plugin will be available? about tern HOT 13 CLOSED

ternjs avatar ternjs commented on August 19, 2024
When vim plugin will be available?

from tern.

Comments (13)

snj33v avatar snj33v commented on August 19, 2024

+1 on that

from tern.

marijnh avatar marijnh commented on August 19, 2024

I was planning to start on it next week. But 'available', as in complete, well-tested, and easy to use, that might take a while (I expect ~2 months).

from tern.

srusskih avatar srusskih commented on August 19, 2024

Greate news! Thanks!

from tern.

kuno avatar kuno commented on August 19, 2024

ok, hopefully we can make some contributions to it.

from tern.

gilligan avatar gilligan commented on August 19, 2024

as for the vim plugin - i took a short glimpse at the tern service and unless i'm mistaken editor plugins are supposed to request completions via http methods ?

I would like to suggest to use a socket connection for interfacing instead. You can have a look at https://github.com/vim-scripts/slimv.vim for a good usage example. The vim-python interface is quite annoying but there is no way around that anyhow.

from tern.

marijnh avatar marijnh commented on August 19, 2024

Hi Tobias, what is the advantage of a raw socket connection as opposed to HTTP?

from tern.

gilligan avatar gilligan commented on August 19, 2024

@marijnh performance mostly. Since we are talking about content-assist the delay really needs to be minimal. For that reason i'd say using plain socket communication should be the better approach with minimal overhead. What are you missing in that, that makes you go for http ?

from tern.

marijnh avatar marijnh commented on August 19, 2024

The overhead for an http request to a local server is tiny (in the order of half a millisecond), so I don't think that argument is significant.

from tern.

gilligan avatar gilligan commented on August 19, 2024

I guess I would still go for socket communication for simplicity sake - A socket interface might be easier to integrate into a broader range of editors than http communication. Plus you don't really need anything that http has to offer feature wise (?).

You might be right about the performance impact though. Also a matter of how long the actual processing by tern will take in comparison..

from tern.

marijnh avatar marijnh commented on August 19, 2024

Simplicity and easy integration are exactly the reason I chose HTTP over managing raw sockets.

from tern.

gilligan avatar gilligan commented on August 19, 2024

well okay never mind then. I still find it odd to use http communication for this but i rest my case then ;)

from tern.

kuno avatar kuno commented on August 19, 2024

@marijnh

I saw you just added a vim plugin, thanks ; )

how to use it for now?

from tern.

marijnh avatar marijnh commented on August 19, 2024

If you source it in your .vimrc, it'll enable Tern-based omni-completion (ctrl-x ctrl-o in insert mode) for JavaScript files.

It is far from finished, though!

from tern.

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.