iocanel / idee

Unified way to perform IDE-like tasks across multiple languages and frameworks in Emacs.
Apache License 2.0
45 stars 3 forks source link

Thank you for the great package Feature Request React/JS Support #1

Open larebsyed opened 5 years ago

larebsyed commented 5 years ago

I want to thank you for this amazing plugin, I just wanted to know do you have support for JS.

iocanel commented 5 years ago

@larebsyed: Thanks!

At the moment the project doesn't have support for actions specific to javascript. Some things like:

are expected to work, but things like: goto defintion, find references etc, will not work.

If I had a list of plugins that provide these features, I could hook them inside.

larebsyed commented 5 years ago

currently I am using https://github.com/ananthakumaran/tide and works with js and ts both.

iocanel commented 5 years ago

@larebsyed: Awesome, I'll try to work on that during the weekend.

iocanel commented 5 years ago

@larebsyed: I spet some time this morning and I came up with the following features:

npm project generator

Using idee-new-project or via the project hydra you can create a new project. This is a simple wrapper around npm that integrates nicely with projectile.

javascript/typescript project detector

Whenever a project is opened that containd package.json or jsconfig.json or tsconfig.json the tide server is automatically restarted using the project root as reference.

tide function delegation

For javascript anf typescript fiels that are part of javascript/typescritp project (see above) functions for:

now point to tide.

These functions are meant to be used either directly or via the provided hydra (mostly the later).

larebsyed commented 5 years ago

@iocanel Amazing work. I look into it and let you know

larebsyed commented 5 years ago

@iocanel Thanks again for the great work. I am facing an issue where opening a javascript file doesn't start the javascript setting for idee.

iocanel commented 5 years ago

@larebsyed: So, the expected behavior is the following:

When you open a javascript project (identified by package.json) in the root, the tide-server is started and the bindings are enabled.

Maybe the bindings need to be enabled anyway and not just in the context of the project, so that they work even when just editing raw javascript. Would that solve the issue?

larebsyed commented 5 years ago

I think your current logic is fine but it seems that on my project the javascript project is not detected automatically.

iocanel commented 5 years ago

@larebsyed: Made a couple of changes.

  1. the function delegation mentioned above should now work of all js/ts files (regardles of the project that contains them.
  2. fix javascript project detection (also added some unit tests to avoid regression).

Can you have a look an let me know how that works for you?

larebsyed commented 5 years ago

@iocanel Thanks ill have look and let you know.

iocanel commented 5 years ago

@larebsyed did you have the chance to play with it?

larebsyed commented 5 years ago

Sorry @iocanel I had tight schedule couple of month. Ill get back to you asap