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

chore(fast-todo-app): setup custom elements language server #6900

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

matteematt
Copy link

@matteematt matteematt commented Jan 25, 2024

Pull Request

πŸ“– Description

Over the last six months we've been working on an LSP plugin for the tsserver which adds custom elements support in tagged template literals. The LSP is build to be extensible for different custom elements dialects, but we've added support for Microsoft FAST ourselves.
This PR installs the LSP in the todo-app example repo as a showcase. This isn't necessarily the best showcase of the LSP due to the fact that this app doesn't use many custom elements, or any from dependencies. I am keen to install it more globally in the repo, or across more apps, dependening on whether you want this adding at all.

demo

🎫 Issues

πŸ‘©β€πŸ’» Reviewer Notes

πŸ“‘ Test Plan

The way to test this depends on your IDE setup, and the way it works with the LSP. You can see in depth info for this here, but I assume you're using vscode so will provide some quick instrucitons below.

1. Check out the branch and use yarn to update the installed dependencies.
2. Navigate to the `todo-app` project directory
3. `$ mkdir .vscode && echo '{ "typescript.tsdk": "../../node_modules/typescript/lib" }' >> .vscode/settings.json` ⚠️ if you've already got project specific settings in this file for your editor then you can manually set the config in your existing file instead.
4. Open vscode at this todo app project level `$ code .`
5. Open a javascript/typescript file and use the command palette to `Select typescript version` and choose the local version.
6. The LSP should now be enabled. You will only see diagnostics information after first interacting with the file

You can observe in todo-app.template.ts if you type a < you'll get a suggestion for <todo-form>

βœ… Checklist

General

  • I have included a change request file using $ yarn change - Contributing guidelines state this is only necessary if you're changing files in the packages/* directory, which this PR is not.
  • I have added tests for my changes. - N/A
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes. - N/A
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

None of these

⏭ Next Steps

Happy to discuss or answer any questions you may have!

@matteematt matteematt marked this pull request as ready for review January 25, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant