-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(extensions): Add emmet extension (#2244)
This adds the built in VSCode emmet extension (Emmet 2.0), and hooks it up. There are a few additional features we need, though, to get it usable: - [x] Handle the `isIncomplete` value from a completion provider - emmet sends this to tell the editor to continue to request completions. We don't handle it, currently. - [x] Proper snippet expansion - we have an extremely minimal snippet implementation, which means the expansion aren't too helpful __Next steps:__ - Completion documentation - there is no preview for the expansion, currently. (tracking in #2329 ) Fixes #1948
- Loading branch information
Showing
64 changed files
with
9,890 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
// Use IntelliSense to learn about possible Node.js debug attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"name": "Launch Extension", | ||
"runtimeExecutable": "${execPath}", | ||
"args": ["--extensionDevelopmentPath=${workspaceFolder}"], | ||
"sourceMaps": true, | ||
"outFiles": ["${workspaceFolder}/out/**/*.js"] | ||
}, | ||
{ | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"name": "Launch Tests", | ||
"runtimeExecutable": "${execPath}", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}", | ||
"--extensionTestsPath=${workspaceFolder}/out/test", | ||
"--disable-extensions", | ||
"--skip-getting-started", | ||
], | ||
"sourceMaps": true, | ||
"outFiles": ["${workspaceFolder}/out/**/*.js"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"emmet.excludeLanguages": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
test/** | ||
src/** | ||
out/** | ||
tsconfig.json | ||
extension.webpack.config.js | ||
CONTRIBUTING.md | ||
cgmanifest.json | ||
yarn.lock | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## How to build and run from source? | ||
|
||
Read the basics about extension authoring from [Extending Visual Studio Code](https://code.visualstudio.com/docs/extensions/overview) | ||
|
||
- Read [Build and Run VS Code from Source](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source) to get a local dev set up running for VS Code | ||
- Open the `extensions/emmet` folder in the vscode repo in VS Code | ||
- Press F5 to start debugging | ||
|
||
## Running tests | ||
|
||
Tests for Emmet extension are run as integration tests as part of VS Code. | ||
|
||
- Read [Build and Run VS Code from Source](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source) to get a local dev set up running for VS Code | ||
- Run `./scripts/test-integration.sh` to run all the integrations tests that include the Emmet tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Emmet integration in Visual Studio Code | ||
|
||
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. | ||
|
||
## Features | ||
|
||
See [Emmet in Visual Studio Code](https://code.visualstudio.com/docs/editor/emmet) to learn about the features of this extension. | ||
|
||
Please read the [CONTRIBUTING.md](https://github.com/Microsoft/vscode/blob/master/extensions/emmet/CONTRIBUTING.md) file to learn how to contribute to this extension. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"registrations": [ | ||
{ | ||
"component": { | ||
"type": "git", | ||
"git": { | ||
"name": "expand-abbreviation", | ||
"repositoryUrl": "https://github.com/emmetio/expand-abbreviation", | ||
"commitHash": "ef943f2056572fe43ce9eebf72929d3c825f3995" | ||
} | ||
}, | ||
"license": "MIT", | ||
"version": "0.5.8" | ||
} | ||
], | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
//@ts-check | ||
|
||
'use strict'; | ||
|
||
const withDefaults = require('../shared.webpack.config'); | ||
|
||
module.exports = withDefaults({ | ||
context: __dirname, | ||
entry: { | ||
extension: './src/extension.ts', | ||
}, | ||
externals: { | ||
'vscode-emmet-helper': 'commonjs vscode-emmet-helper', | ||
}, | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.