remark-language-server
!Buildbuild-badgebuild
!Downloadsdownloads-badgedownloads
!Sponsorssponsors-badgecollective
!Backersbackers-badgecollective
!Chatchat-badgechatA language server to lint and format markdown files with remark.
Contents
Configuration file Settings Emacs Neovim vim-lsp Visual Studio CodeWhat is this?
This package is a language server which can lint and format markdown files using remark.When should I use this?
You can use this package when you want to enhance your editor with linting and formatting of markdown files. Some editors can consume this package directly, others need a plugin in order to consume this package.Install
This package is ESM only. In Node.js (version 16.0+, or 18.0+), install with npm:npm install remark-language-server
Use
Usage of this package depends on your editor integration. Because this is based onunified-languageserver-node
unified-languageserver-node, the same features
are supported.Configuration file
remark-language-server
uses the same configuration files as
remark-cli
remark-cli.
These files are:.remarkrc
.remarkrc.cjs
.remarkrc.js
.remarkrc.json
.remarkrc.mjs
.remarkrc.yaml
.remarkrc.yml
package.json
Language clients should notify the language server if these files change. They are looked up starting at the folder where the checked markdown file exists.
Settings
This language server supports the following settings:remark.requireConfig
(boolean
, default:false
) — If true, only perform
Examples
Emacs
Uselsp-mode
lsp-mode to use the remark language server with Emacs.Neovim
The remark language server is part ofnvim-lspconfig
nvim-lspconfig, a
collection of common configurations for Neovim’s built-in language server
client.
This means you can add remark language server in one line:require'lspconfig'.remark_ls.setup {
settings = {
requireConfig = true
}
}
nvim-lspconfig
has
detailed installation instructionsnvim-lspconfig-instructions such as
configuration options.vim-lsp
The remark language server can be used withvim-lsp
vim-lsp.
You can configure it to be started when a markdown file is opened.if (executable('remark-language-server'))
au User lsp_setup call lsp#register_server({
\ 'name': 'remark',
\ 'cmd': {server_info->['remark-language-server', '--stdio']},
\ 'allowlist': ['markdown'],
\ 'config': lsp_settings#get('remark-language-server', 'config', lsp_settings#server_config('remark-language-server')),
\ 'workspace_config': lsp_settings#get('remark-language-server', 'workspace_config', {
\ 'requireConfig': v:true,
\ }),
\ })
endif
Otherwise, if you use
vim-lsp-settings
vim-lsp-settings, you will be asked
to use the remark language server automatically when a markdown file is opened.Visual Studio Code
Usevscode-remark
vscode-remark to use the remark language server with
Visual Studio Code.Compatibility
Projects maintained by the unified collective are compatible with all maintained versions of Node.js. As of now, that is Node.js 16.0+, and 18.0+. Our projects sometimes work with older versions, but this is not guaranteed.Contribute
Seecontributing.md
contributing in remarkjs/.github
health for ways
to get started.
See support.md
support for ways to get help.
Join us in Discussionschat to chat with the community and contributors.This project has a code of conductcoc. By interacting with this repository, organization, or community you agree to abide by its terms.