Skip to content

Commit 0817f22

Browse files
authored
Merge pull request #65 from typed-ember/vscode-extension-publish
Prepare VS Code extension for publication
2 parents 48cca29 + 378322b commit 0817f22

File tree

4 files changed

+84
-11
lines changed

4 files changed

+84
-11
lines changed

packages/vscode/.vscodeignore

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
.vscode/**
21
.gitignore
3-
**/*.map
4-
**/.eslintrc.json
2+
.eslintignore
3+
4+
.vscode/
5+
.vscode-test/
6+
7+
__tests__/
8+
__fixtures__/
9+
src/
10+
11+
tsconfig.json
12+
tsconfig.tsbuildinfo
13+
14+
jest.config.js
15+
16+
node_modules/**/*.d.ts

packages/vscode/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1-
# A Visual Studio Code extension for the [glint] language server.
1+
# Glint VS Code Extension
2+
3+
A Visual Studio Code extension for the [Glint] language server.
24

35
[glint]: https://github.com/typed-ember/glint
6+
7+
## Setup
8+
9+
See the [Glint home page] for a more detailed Getting Started guide.
10+
11+
1. Add `@glint/core` and an appropriate environment package to your project's `devDependencies`.
12+
1. Create a `.glintrc` file in the root of your project specifying your environment and any other relevant configuration.
13+
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>
14+
<img src="https://user-images.githubusercontent.com/108688/111069039-6dc84100-84cb-11eb-8339-18a589be2ac5.png" width="500">
15+
</details>
16+
17+
[glint home page]: https://github.com/typed-ember/glint
18+
19+
## Usage
20+
21+
The Glint language server incorporates Glimmer templates into TypeScript-powered tooling for a project, enabling them to participate in rich editor features such as:
22+
23+
- Quickinfo on hover:
24+
<br>
25+
<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">
26+
- Go to definition:
27+
<br>
28+
<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">
29+
- Symbol renaming:
30+
<br>
31+
<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">
32+
- Find references:
33+
<br>
34+
<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">
35+
- Completions:
36+
<br>
37+
<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">

packages/vscode/assets/glint.png

45.3 KB
Loading

packages/vscode/package.json

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
{
2-
"name": "@glint/vscode",
3-
"version": "0.0.0",
2+
"name": "glint-vscode",
3+
"displayName": "Glint",
4+
"description": "Glint language server integration for VS Code",
5+
"version": "0.3.0",
6+
"publisher": "typed-ember",
7+
"preview": true,
48
"private": true,
5-
"description": "A Visual Studio Code extension for the glint language server",
69
"author": "James C. Davis (https://github.com/jamescdavis)",
710
"license": "MIT",
11+
"main": "lib/extension.js",
12+
"homepage": "https://github.com/typed-ember/glint/packages/vscode",
13+
"repository": {
14+
"url": "https://github.com/typed-ember/glint"
15+
},
16+
"keywords": [
17+
"ember",
18+
"glimmer",
19+
"handlebars",
20+
"typescript"
21+
],
22+
"categories": [
23+
"Programming Languages",
24+
"Linters"
25+
],
826
"files": [
927
"README.md",
1028
"lib"
@@ -13,15 +31,24 @@
1331
"lint": "eslint . --max-warnings 0 && prettier --check src",
1432
"test": "node __tests__/support/launch-from-cli.js",
1533
"build": "tsc --build",
16-
"prepack": "yarn build"
34+
"vscode:prepublish": "yarn build"
1735
},
1836
"engines": {
19-
"vscode": "^1.40.0"
37+
"vscode": "^1.52.0"
2038
},
2139
"activationEvents": [
22-
"*"
40+
"workspaceContains:.glintrc*"
2341
],
24-
"main": "lib/extension.js",
42+
"icon": "assets/glint.png",
43+
"galleryBanner": {
44+
"color": "#1E293B",
45+
"theme": "dark"
46+
},
47+
"workspaces": {
48+
"nohoist": [
49+
"**/*"
50+
]
51+
},
2552
"dependencies": {
2653
"resolve": "^1.20.0",
2754
"vscode-languageclient": "^7.0.0"

0 commit comments

Comments
 (0)