Skip to content

Commit

Permalink
Site: add editor file association instructions (#3888)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shockwave3301 authored and Conduitry committed Nov 10, 2019
1 parent eb0cfbc commit 31a81d3
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions site/content/blog/2019-04-15-setting-up-your-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ authorURL: https://twitter.com/Rich_Harris
draft: true
---

*Coming soon* This post will walk you through setting up your editor so that recognises Svelte files:
*__Coming soon__*

This post will walk you through setting up your editor so that recognises Svelte files:

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

## Atom

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

```cson
"*":
Expand Down Expand Up @@ -45,3 +47,23 @@ To set the filetype for a single file, use a [modeline](https://vim.fandom.com/w
```
<!-- vim: set ft=html :-->
```

## Visual Studio Code

To treat `*.svelte` files as HTML, add the following lines to your `settings.json` file:

```cson
"files.associations": {
"*.svelte": "html"
}
```

## JetBrains WebStorm

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.

## Sublime Text 3

Open any `.svelte` file.

Go to *__View → Syntax → Open all with current extension as... → HTML__*.

0 comments on commit 31a81d3

Please sign in to comment.