在Neovim中配置markdown书写环境

安装服务端

1
npm install -g remark-language-server

配置客户端

增加一个配置文件lua/servers/remark_ls.lua

1
require 'lspconfig'.remark_ls.setup {}

init.lua中增加引用

1
require('servers.remark_ls')

项目配置文件

在每一个项目中,都要增加对应的一个配置

1
npm install remark-preset-lint-markdown-style-guide

并且在根目录增加一个.remarkrc.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"plugins": [
"remark-preset-lint-markdown-style-guide",
["remark-lint-list-item-indent", "space"],
["remark-lint-unordered-list-marker-style", "*"],
["remark-lint-heading-style", false],
["remark-lint-maximum-line-length", false],
["remark-lint-maximum-heading-length", false],
["remark-lint-fenced-code-marker", "consistent"]
],
"settings": {
"rule": "-",
"ruleRepetition": 3,
"listItemIndent": 1,
"bullet": "*"
}
}

References