Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glint language server, etc. #40

Closed
wants to merge 6 commits into from
Closed

Conversation

jamescdavis
Copy link
Member

@jamescdavis jamescdavis commented Jan 7, 2021

This adds three packages:

  • packages/language-server - a language server supporting hbs template:
    • typechecking
    • completion
    • hover
    • go-to-definition
  • packages/vscode - a Visual Studio Code extension for @glint/language-server
  • test-packages/demo-ember-app - an Ember app to demonstrate @glint/language-server

To see the language server in action:

  1. make sure you have run yarn and yarn build in the glint repo to build all packages
  2. open packages/vscode in VSCode
  3. run the extension (F5 or go to Run in the activity bar and press green play button next to Run Extension)
  4. in the Extension Development Host, open test-packages/demo-ember-app
  5. open app/components/foo.hbs
  6. profit

Notes:

  • packages/language-server/src/load-typescript.ts was lifted verbatim from packages/cli. We should probably put this somewhere it can be shared.
  • packages/language-server/src/transform-manager.ts is based on (but, at this point, pretty different from) packages/cli/transform-manager.ts. There may be some opportunities for factoring out shared bits.
  • there is almost certainly some DRYing up and other refactoring that could happen in packages/language-server/src/glint-language-server.ts and packages/language-server/src/transform-manager.ts.
  • I'm not 100% convinced the API and encapsulation boundaries I've defined for packages/language-server/src/glint-language-server.ts and packages/language-server/src/transform-manager.ts are where I'd like them to be, but gotta start somewhere!
  • I'm not sure packages/language-server/src/glint-language-server.ts is the correct name for this file/class, but names are hard.
  • I also have it working in Vim (via ALE) with an ale_linters Vimscript (which will need to be PRed to ALE)
  • there are no tests, yet (in progress)

@jamescdavis jamescdavis requested a review from dfreeman January 7, 2021 06:34
@jamescdavis jamescdavis force-pushed the glint-language-server branch 7 times, most recently from c7f12bc to b023473 Compare January 7, 2021 09:49
@jamescdavis jamescdavis added the enhancement New feature or request label Jan 7, 2021
@dfreeman
Copy link
Member

Closing this out to avoid confusion. Thanks for laying the foundation here @jamescdavis!

@dfreeman dfreeman closed this Feb 26, 2021
@dfreeman dfreeman mentioned this pull request Feb 27, 2021
@dfreeman dfreeman deleted the glint-language-server branch March 6, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants