ember-language-server icon indicating copy to clipboard operation
ember-language-server copied to clipboard

Pods support

Open AvremelM opened this issue 7 years ago • 1 comments

This PR introduces support for discovering routes and components in pod directories (#53). This allows completion in templates as well as support for "go to definition".

Everything seems to be working, and existing tests are passing, ~but additional tests need to be added.~ and additional tests for pods are added and working.

Also, the method used for discovering the correct podModulePrefix probably needs fixing and tweaking for nested projects. I could use some help/guidance there as I'm not completely familiar with those scenarios.

  • [x] Old tests passing
  • [x] New tests added (and passing)

Some other things in this PR worth noting:

  • Robustness! Completions provider now checks if directories exist before calling walkSync on them, which prevents errors and subsequent empty responses if any directory is missing. This is good because Ember doesn't actually require that you have a /helpers or /transforms directory. Additionally many pods applications probably won't have /routes, /components, or /templates directories. Until now, not having any of these directories prevented any completions being returned at all.
  • Updated walk-sync dependency (new version adds type definitions).
  • Minor refactor of integration tests

AvremelM avatar Oct 26 '18 01:10 AvremelM

Tests added, WIP tag removed. @Turbo87 Can you review this please, when you get a chance?

AvremelM avatar Nov 01 '18 16:11 AvremelM