Coder Social home page Coder Social logo

Some flexibility around completions about tern HOT 5 CLOSED

ternjs avatar ternjs commented on July 19, 2024
Some flexibility around completions

from tern.

Comments (5)

hoschi avatar hoschi commented on July 19, 2024

+1! Maatch in the middle like YouCompleteMe, CommandT or CtrlP (vim plugins) are very usefull :)

from tern.

marijnh avatar marijnh commented on July 19, 2024

This is definitely on the radar. Probably eventually there'll be a 'simple' completion service like the one that currently exists, and a 'full' one where you get every possible completion and then some, and the plug-in has to do a bit more work to actually filter them itself.

I have not gotten around to this yet.

from tern.

marijnh avatar marijnh commented on July 19, 2024

The completions service now allows some control over the returned data by adding properties to the query:

  • types: Add a field indicating the type of the completed thing
  • depths: Add a field indicating the distance (in scope or prototype chain) to the completed thing
  • omitObjectPrototype: Explicitly set to false to disable the default heuristic where it assumes you only want to see hasOwnProperty and friends if you have at least two matching letters.
  • filter: Explicitly set to false to get all possible completions, not just matching ones.
  • guess: Set to false to disable behavior where, if nothing is found, it adds any matching properties it can find.
  • sort: Set to false to get the results unsorted.

from tern.

andykais avatar andykais commented on July 19, 2024

Is this something I can add to a .tern-project file? I would like a way to hide builtins from my autocompletion like prototype

from tern.

marijnh avatar marijnh commented on July 19, 2024

You'd have to implement it in your editor plugin, or as a tern plugin providing a custom completion query type.

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.