1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-31 22:50:06 +08:00
SpaceVim/docs/layers/lang/html.md
Torrez, Milton N c5ca267ed9
docs(lang#html): fix layer option demo
change `[layers]` to `[[layers]]`
2021-10-07 09:29:12 +08:00

65 lines
1.4 KiB
Markdown

---
title: "SpaceVim lang#html layer"
description: "Edit html in SpaceVim, with this layer, this layer provides code completion, syntax checking and code formatting for html."
---
# [Available Layers](../../) >> lang#html
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Language server](#language-server)
- [Layer options](#layer-options)
- [Features](#features)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer adds support for editing HTML and CSS.
## Install
To use this configuration layer, update your custom configuration file with:
```toml
[[layers]]
name = "lang#html"
```
### Language server
To install the language server, you need `npm` on your machine:
```bash
npm install --global vscode-html-languageserver-bin
```
## Layer options
- `emmet_leader_key`: change the default leader key for emmet.
- `emmet_filetyps`: Set the filetypes for enabling emmet
```toml
[[layers]]
name = "lang#html"
emmet_leader_key = "<C-e>"
emmet_filetyps = ['html']
```
## Features
- Generate HTML and CSS code using [neosnippet](https://github.com/Shougo/neosnippet.vim/) and [emmet-vim](https://github.com/mattn/emmet-vim)
- Tags navigation on key `%` using vim-matchup
- auto-completion
- syntax checking
- language server protocol (need `lsp` layer)
## Key bindings
| Key Bindings | Descriptions |
| ------------ | ------------ |
| `Ctrl-e` | emmet prefix |