Skip to content

Prepare VS Code extension for publication #65

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

Merged
merged 1 commit into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions packages/vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
.vscode/**
.gitignore
**/*.map
**/.eslintrc.json
.eslintignore

.vscode/
.vscode-test/

__tests__/
__fixtures__/
src/

tsconfig.json
tsconfig.tsbuildinfo

jest.config.js

node_modules/**/*.d.ts
36 changes: 35 additions & 1 deletion packages/vscode/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# A Visual Studio Code extension for the [glint] language server.
# Glint VS Code Extension

A Visual Studio Code extension for the [Glint] language server.

[glint]: https://github.com/typed-ember/glint

## Setup

See the [Glint home page] for a more detailed Getting Started guide.

1. Add `@glint/core` and an appropriate environment package to your project's `devDependencies`.
1. Create a `.glintrc` file in the root of your project specifying your environment and any other relevant configuration.
1. Consider disabling the built-in `vscode.typescript-language-features` extension for any workspaces where you use Glint to avoid extraneous diagnostics. <details><summary>Screenshot</summary>
<img src="https://user-images.githubusercontent.com/108688/111069039-6dc84100-84cb-11eb-8339-18a589be2ac5.png" width="500">
</details>

[glint home page]: https://github.com/typed-ember/glint

## Usage

The Glint language server incorporates Glimmer templates into TypeScript-powered tooling for a project, enabling them to participate in rich editor features such as:

- Quickinfo on hover:
<br>
<img src="https://user-images.githubusercontent.com/108688/111069238-6eada280-84cc-11eb-9abb-c2d3af5e8976.png" width="590" alt="Signature information being shown on hover for a component's named block">
- Go to definition:
<br>
<img src="https://user-images.githubusercontent.com/108688/111069304-b6ccc500-84cc-11eb-83b2-49681b248cbe.png" width="912" alt="The definition for a component being shown from the site of its invocation in a template">
- Symbol renaming:
<br>
<img src="https://user-images.githubusercontent.com/108688/111070668-ff877c80-84d2-11eb-9a5a-57ae9be7fe2a.gif" width="447" alt="Fields on an object being renamed and having their other uses updated to match">
- Find references:
<br>
<img src="https://user-images.githubusercontent.com/108688/111070826-c6034100-84d3-11eb-9c12-e8e80e168940.png" width="931" alt="Template snippets where a component is used being shown from the site of its declaration">
- Completions:
<br>
<img src="https://user-images.githubusercontent.com/108688/111070948-3f9b2f00-84d4-11eb-9eaa-077cadf6f380.png" width="1010" alt="Component arguments being suggested with type information and documentation">
Binary file added packages/vscode/assets/glint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 34 additions & 7 deletions packages/vscode/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
{
"name": "@glint/vscode",
"version": "0.0.0",
"name": "glint-vscode",
"displayName": "Glint",
"description": "Glint language server integration for VS Code",
"version": "0.3.0",
"publisher": "typed-ember",
"preview": true,
"private": true,
"description": "A Visual Studio Code extension for the glint language server",
"author": "James C. Davis (https://github.com/jamescdavis)",
"license": "MIT",
"main": "lib/extension.js",
"homepage": "https://github.com/typed-ember/glint/packages/vscode",
"repository": {
"url": "https://github.com/typed-ember/glint"
},
"keywords": [
"ember",
"glimmer",
"handlebars",
"typescript"
],
"categories": [
"Programming Languages",
"Linters"
],
"files": [
"README.md",
"lib"
Expand All @@ -13,15 +31,24 @@
"lint": "eslint . --max-warnings 0 && prettier --check src",
"test": "node __tests__/support/launch-from-cli.js",
"build": "tsc --build",
"prepack": "yarn build"
"vscode:prepublish": "yarn build"
},
"engines": {
"vscode": "^1.40.0"
"vscode": "^1.52.0"
},
"activationEvents": [
"*"
"workspaceContains:.glintrc*"
],
"main": "lib/extension.js",
"icon": "assets/glint.png",
"galleryBanner": {
"color": "#1E293B",
"theme": "dark"
},
"workspaces": {
"nohoist": [
"**/*"
]
},
"dependencies": {
"resolve": "^1.20.0",
"vscode-languageclient": "^7.0.0"
Expand Down