Giter Site home page Giter Site logo

lt-ternjs's People

Contributors

armaklan avatar azmr avatar mortalapeman avatar teachmefly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lt-ternjs's Issues

Add support for loading a single .tern-project file

While configuring tern through the default behaviors is definitely a route to take, it would be nice to offer a behavior that reads a .tern-project file and sends it to the server. Any relative file paths would need to be converted to absolute path, relative to the file's location.

TernJs continue to run after LightTable close

When i close LightTable, TernJS continue to work on background :

/opt/LightTable/plugins/node/node /home/armaklan/.config/LightTable/plugins/TernJS/node/ternserver.js --harmony

OS Linux
LightTable 0.6.5
Plugin v 0.1.5

Tern no longer finds node_modules

Hey there. Finally got some time to experiment with this again at work. The good news is that it no longer hangs on the large node client/server stack that was previously causing it trouble. It throws up its hands and gives up on AMD, but that's par for the course even with humans sometimes. ๐Ÿ“ฆ

Unfortunately, it no longer seems capable of finding definitions within the node_modules directory, which is 80% of it's use case for me. When I want documentation on a function or need to jump to its definition, it's almost never in the same app as I'm currently in (as we try to avoid giant monolithic apps). While I agree it shouldn't eagerly parse each module, it would be nice if it could recognize that I asked for information on a node module and parse it then.

Cheers,
Josh

ternserver.js gets stuck at 100% cpu on one core

I'm not sure if I should report this here or at tern.js. While using LightTable, sometimes I notice the fans are blowing full speed non stop. When looking at the task manager, I see that a node process that runs ternserver.js is using one of the CPU cores at 100%. If I close LightTable and start it again, I may and with several instances of this process, each using one core.

In the editor sometimes I notice that autocomplete acts weird. The suggestions close immediately without having time to choose one, or existing variables are not suggested. After 5 or 10 seconds it starts working again.

I posted a screenshot and a comment about it in the LT issues.

Is there anything I can do to help find why this is happening?

Error: channel closed

Hi,

I don't know if this is expected behavior or not. When using the LT-TernJS plugin I constantly have the following error in my console.

Error channel closed
  at ChildProcess.target.send(child_process.js:402:26)
  at eval...
  ...

I have tried running it with the default behavior and also adding the following to my workspace.behaviors.

{:+ {:tern.config [(:lt.plugins.tern/libs :ecma5)
                   (:lt.plugins.tern/plugin :node true)]}
 :- {:tern.config [:lt.plugins.tern/libs :ecma5 :browser :jquery :underscore]}}

I get some form of auto-completion although it is very noisy and near useless in that form to me.

When I try the jump to definition feature I simply get a "Disconnected from Tern Javascript Server" message in the console and nothing happens.

When I try the in-line documentation feaure the same error happens: "Disconnected from Tern Javascript Server" and nothing happens.

I think I just don't get I to set it up properly or something.

Ability to configure plugins for Tern server

Currently, the nodejs file used to setup the Tern server loads all plugins found in the provided node module. We need a way to configure which plugins get loaded by the tern process that fits with the Light Table architecture.

I was thinking of using behaviors for the configuration like below:

{:+ {:tern-client [(:lt.plugins.tern/use-plugin "angular.js")]}}

Since behaviors can be setup on the workspace level, this seemed like a good path to investigate. We would need to a way inform the Tern server if behaviors change and I'm sure there are other issues I haven't thought of just yet.

Problems with transient javascript editor

If I open a new editor and set editor syntax to javascript, autocomplete starts to report errors in the console

typically:
Uncaught Error: No protocol method IDeref.-deref defined for type null:

(mac os/x lt 0.6.5 plugin v 0.1.2)

Invalid behavior: :lt.plugins.tern/start-server - Light Table 0.8.0

Light Table Version: 0.8.0
Platform: Windows x64
TernJS Version: 0.1.9 (According to Plugin Manager)

Fails with:
TypeError: Cannot read property 'call' of undefined at Function.__BEH__start_server
(ternjs_compiled.js:423:23)
... bunch of bootstrap.js logs...
at Function.__BEH__try_send (ternjs_compiled.js:510:25)

I would really like to use this plugin on Light Table. Let me know if you need any other info.

Add command for generating Tern defs for a library

Tern supports condensing an inferred set of type to a JSON description document. The idea being that big libraries can be analyzed once, dumped, and then cheaply included in later analysis or modified to add documentation.

Ability to configure JSON definition files for Tern

Currently, the nodejs file used to setup the Tern server loads all JSON defs found in the provided node module. We need a way to configure which defs get loaded by the tern process that fits with the Light Table architecture.

I was thinking of using behaviors for the configuration like below:

{:+ {:tern-client [(:lt.plugins.tern/use-def "jQuery.json")]}}

Since behaviors can be setup on the workspace level, this seemed like a good path to investigate. We would need to a way inform the Tern server if behaviors change and I'm sure there are other issues I haven't thought of just yet.

Disconnected from: Tern Javascript Server

OS-X 10.10, LT 0.8, TernJS 0.1.10

With any kind of JS project all i get is:

Error: spawn /Applications/lighttable-0.8.1-mac/LightTable.app/Contents/Resources/app/plugins/node/node ENOENT
    at exports._errnoException (util.js:837:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)
Error: channel closed
    at ChildProcess.target.send (internal/child_process.js:509:16)
    at eval (/Users/fjenett/Library/Application%20Support/LightTable/plugins/TernJS/ternjs_compiled.js:442:16)
    at eval (/Users/fjenett/Library/Application%20Support/LightTable/plugins/TernJS/ternjs_compiled.js:277:36)
    at eval (/Users/fjenett/Library/Application%20Support/LightTable/plugins/TernJS/ternjs_compiled.js:212:14)
    at eval (/Users/fjenett/Library/Application%20Support/LightTable/plugins/TernJS/ternjs_compiled.js:95:18)
    at eval (/Users/fjenett/Library/Application%20Support/LightTable/plugins/TernJS/ternjs_compiled.js:111:18)
    at FSReqWrap.oncomplete (fs.js:82:15)

Error: spawn and Error: channel closed keep repeating over and over again whenever i type anything.

I'm using nvm as node version manager. Also i can not find any node inside the .app bundle's plugin folder (where it seems to look for it in the error message above).

Any idea how to further debug this?

How is this plugin used?

I'm running the latest release version of Light Table on Windows 7. I installed the plugin (seemingly). What now?

I tried to view inline docs for a function with a JSDoc-style comment (in the same JavaScript file) but nothing happens (that I can see).

Does Tern need to be installed and setup separately?

Can I use this plugin in a project (workspace) that's not using Node.js or RequireJS?

Allow other plugins to append to list of hints / append tern hints to any existing hints ?

Hi !

I've failed to get my lt-snippets hints to play nicely with hints from this plugin. Basically I'm trying to append hints from my plugin to whatever else there might be of hints from other plugins. It's entirely possible its all my fault, but it does work for other plugins (clojure, the core javascript plugin to name a few).

Could the reason be that this behaviors return hints isn't actually appended to the hints input parameter ?
Similar to this

Add support for variable renaming

Tern supports rename refactoring and some work will be needed to make this a pleasant experience in Light Table. It would be nice to have a drop-down text box show up from a keyboard shortcut or right click menu. We probably want to open all the affected files in the editor with the changes made, but not saved. Not sure what the path of least surprise is just yet.

Plugin loads more JS files than necessary and does so synchronously

When first started, the plugin reads all .js files found in one's workspace synchronously. Currently all directories are read in, including the node_modules directory if it exists. Tern's node plugin appears to be able to load modules just like node, so we can probably exclude the node_modules directory completely when doing our .js file crawl.

It would also be preferable to move to an async file search, probably utilizing LT's background macro. That way we don't lock up the UI when initializing the Tern server.

EDIT: This issue originated from a problem described here but has since been repurposed. The root cause of the original issue has proven to be elusive.

JSDoc text display needs formating

When requesting doc comments from the server, the comment is returned with all characters (including asterisks) except new lines. While this is helpful, it doesn't display very well. We may need to look into parsing the comment strings our self and formatting the output for the doc display.

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.