@markdownkit/lsp
v2.0.1
Published
Language Server Protocol implementation for Markdownkit - lint and format markdown with remark
Maintainers
Readme
Markdownkit Language Server
A Language Server Protocol (LSP) implementation for markdown files using remark.
Features
- Real-time linting - Diagnostics as you type
- Document formatting - Format on save or demand
- Code actions - Quick fixes for common issues
- Configuration - Uses
.remarkrcfiles
Installation
npm install -g @markdownkit/lspUsage
With stdio (recommended for editors)
markdownkit-lsp --stdioProgrammatic usage
import { createMarkdownkitServer } from "@markdownkit/lsp";
createMarkdownkitServer();Editor Integration
VS Code
Install the Markdownkit extension which uses this server.
Neovim
require('lspconfig').markdownkit_lsp.setup {
cmd = { 'markdownkit-lsp', '--stdio' },
filetypes = { 'markdown' },
}Emacs (lsp-mode)
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection '("markdownkit-lsp" "--stdio"))
:major-modes '(markdown-mode)
:server-id 'markdownkit-lsp))Configuration
Create a .remarkrc.js in your project:
export default {
settings: {
bullet: "-",
emphasis: "_",
strong: "*",
},
plugins: [
"remark-gfm",
"remark-frontmatter",
"remark-preset-lint-recommended",
],
};License
MIT
