2018-01-19 00:00:53 +08:00
|
|
|
---
|
|
|
|
title: "SpaceVim lang#html layer"
|
2018-01-19 20:49:01 +08:00
|
|
|
description: "Edit html in SpaceVim, with this layer, this layer provides code completion, syntax checking and code formatting for html."
|
2018-01-19 00:00:53 +08:00
|
|
|
---
|
|
|
|
|
2018-06-23 14:37:41 +08:00
|
|
|
# [Available Layers](../../) >> lang#html
|
2018-01-19 00:00:53 +08:00
|
|
|
|
|
|
|
<!-- vim-markdown-toc GFM -->
|
|
|
|
|
|
|
|
- [Description](#description)
|
2018-06-23 14:37:41 +08:00
|
|
|
- [Install](#install)
|
2018-01-19 00:00:53 +08:00
|
|
|
- [Language server](#language-server)
|
|
|
|
- [Features](#features)
|
2018-01-19 20:49:01 +08:00
|
|
|
- [Key bindings](#key-bindings)
|
2018-01-19 00:00:53 +08:00
|
|
|
|
|
|
|
<!-- vim-markdown-toc -->
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2018-01-19 20:49:01 +08:00
|
|
|
This layer adds support for editing HTML and CSS.
|
2018-01-19 00:00:53 +08:00
|
|
|
|
2018-06-23 14:37:41 +08:00
|
|
|
## Install
|
2018-01-19 00:00:53 +08:00
|
|
|
|
2018-06-23 14:37:41 +08:00
|
|
|
To use this configuration layer, update custom configuration file with:
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[[layers]]
|
|
|
|
name = "lang#html"
|
|
|
|
```
|
2018-01-19 00:00:53 +08:00
|
|
|
|
|
|
|
### Language server
|
|
|
|
|
|
|
|
To install the language server, you need `npm` on your machine:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm install --global vscode-html-languageserver-bin
|
|
|
|
```
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
2018-01-19 20:49:01 +08:00
|
|
|
- Generate HTML and CSS coding using [neosnippet](https://github.com/Shougo/neosnippet.vim/) and [emmet-vim](https://github.com/mattn/emmet-vim)
|
|
|
|
- Tags navigation on key % using matchit.vim
|
2018-01-19 00:00:53 +08:00
|
|
|
- auto-completion
|
|
|
|
- syntax checking
|
2019-01-07 21:15:22 +08:00
|
|
|
- language server protocol (need `lsp` layer)
|
2018-01-19 20:49:01 +08:00
|
|
|
|
|
|
|
## Key bindings
|
|
|
|
|
|
|
|
| key bindings | Description |
|
|
|
|
| ------------ | ------------ |
|
|
|
|
| `<C-e>` | emmet prefix |
|