Skip to content

Commit 31a81d3

Browse files
Shockwave3301Conduitry
authored andcommitted
Site: add editor file association instructions (#3888)
1 parent eb0cfbc commit 31a81d3

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

site/content/blog/2019-04-15-setting-up-your-editor.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ authorURL: https://twitter.com/Rich_Harris
66
draft: true
77
---
88

9-
*Coming soon* This post will walk you through setting up your editor so that recognises Svelte files:
9+
*__Coming soon__*
10+
11+
This post will walk you through setting up your editor so that recognises Svelte files:
1012

1113
* eslint-plugin-svelte3
1214
* svelte-vscode
1315
* associating .svelte files with HTML in VSCode, Sublime, etc.
1416

1517
## Atom
1618

17-
To treat `*.svelte` files as HTML, open Edit → Config... and add the following lines to your `core` section:
19+
To treat `*.svelte` files as HTML, open *__Edit → Config...__* and add the following lines to your `core` section:
1820

1921
```cson
2022
"*":
@@ -45,3 +47,23 @@ To set the filetype for a single file, use a [modeline](https://vim.fandom.com/w
4547
```
4648
<!-- vim: set ft=html :-->
4749
```
50+
51+
## Visual Studio Code
52+
53+
To treat `*.svelte` files as HTML, add the following lines to your `settings.json` file:
54+
55+
```cson
56+
"files.associations": {
57+
"*.svelte": "html"
58+
}
59+
```
60+
61+
## JetBrains WebStorm
62+
63+
To treat `*.svelte` files as HTML in WebStorm, you need to create a new file type association. Please refer to the [JetBrains website](https://www.jetbrains.com/help/webstorm/creating-and-registering-file-types.html) to see how.
64+
65+
## Sublime Text 3
66+
67+
Open any `.svelte` file.
68+
69+
Go to *__View → Syntax → Open all with current extension as... → HTML__*.

0 commit comments

Comments
 (0)