Skip to content

Commit 442d20c

Browse files
authored
Document editors that support MDX language server (#475)
Both `lsp-mode` and `nvim-lspconfig` support the MDX language server.
1 parent 54bebbc commit 442d20c

1 file changed

Lines changed: 31 additions & 4 deletions

File tree

packages/language-server/README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ A [language server][lsp] for [MDX][].
2020
* [Configuration](#configuration)
2121
* [TypeScript](#typescript)
2222
* [Plugins](#plugins)
23-
* [Examples](#examples)
23+
* [Editors](#editors)
24+
* [Emacs](#emacs)
25+
* [Neovim](#neovim)
2426
* [Visual Studio Code](#visual-studio-code)
2527
* [Compatibility](#compatibility)
2628
* [Security](#security)
@@ -184,16 +186,33 @@ For information on plugin support, see the
184186
[Plugins section](https://github.com/mdx-js/mdx-analyzer#plugins) of the
185187
repository readme.
186188

187-
## Examples
189+
## Editors
188190

189-
MDX language server can be integrated with any server that supports
191+
MDX language server can be integrated with any editor that supports
190192
[language servers][lsp].
191193
Does your editor support MDX language server, but is it not in this list?
192194
Feel free to add it.
193195

196+
### Emacs
197+
198+
Use [`lsp-mode`][lsp-mode] to use the MDX language server with Emacs.
199+
200+
### Neovim
201+
202+
You can add MDX support to MDX via [`nvim-lspconfig`][nvim-lspconfig].
203+
After installing MDX language server, add the language server setup to your
204+
`init.lua`.
205+
206+
```lua
207+
require'lspconfig'.mdx_analyzer.setup{}
208+
```
209+
210+
For more details, see the
211+
[`nvim-lspconfig` MDX analyzer][nvim-lspconfig mdx-analyzer] documentation.
212+
194213
### Visual Studio Code
195214

196-
Use `unifiedjs.vscode-mdx` to use the MDX language server with
215+
Use [`unifiedjs.vscode-mdx`][vscode-mdx] to use the MDX language server with
197216
[Visual Studio Code][vscode].
198217

199218
## Compatibility
@@ -333,12 +352,18 @@ Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.m
333352

334353
[lsp commands]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#command
335354

355+
[lsp-mode]: https://github.com/emacs-lsp/lsp-mode
356+
336357
[mdx]: https://mdxjs.com
337358

338359
[mit]: LICENSE
339360

340361
[npm]: https://docs.npmjs.com/cli/install
341362

363+
[nvim-lspconfig]: https://github.com/neovim/nvim-lspconfig
364+
365+
[nvim-lspconfig mdx-analyzer]: https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#mdx_analyzer
366+
342367
[sponsor]: https://mdxjs.com/community/sponsor/
343368

344369
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -356,3 +381,5 @@ Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.m
356381
[vscode-languageserver]: https://github.com/microsoft/vscode-languageserver-node/tree/main/server
357382

358383
[vscode]: https://code.visualstudio.com
384+
385+
[vscode-mdx]: https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx

0 commit comments

Comments
 (0)