| Crates.io | prosemd-lsp |
| lib.rs | prosemd-lsp |
| version | 0.1.0 |
| created_at | 2021-03-12 19:41:00.379506+00 |
| updated_at | 2021-03-12 19:41:00.379506+00 |
| description | An experimental proofreading and linting language server for markdown files |
| homepage | https://github.com/kitten/prosemd-lsp |
| repository | https://github.com/kitten/prosemd-lsp |
| max_upload_size | |
| id | 367848 |
| size | 8,901,319 |
prosemd is an experimental proofreading and linting language server for markdown files.
It aims to provide helpful and smart diagnostics when writing prose for technical or non-technical
documents alike.
Under the hood, it integrates with any editor supporting the Language Server Protocol, and uses nlprule, which is based on LanguageTool, to highlight possible errors and provides suggestions on how to address them.
Note: On the roadmap for more features are other useful linting rules, related to Markdown links, formatting, and other potentially helpful features, however for now
prosemdis limited to just grammar & style correction withnlpruleand only supports English.
If you're using VSCode, all you have to do is install the prosemd extension.
Read more about the VSCode extension.
If you're setting the language server up with your editor of choice then you'll need to either download the executable or compile it from source:
prosemd-lsp-linux, prosemd-lsp-windows.exe, or prosemd-lsp-macos).cargo install prosemd-lsp to compile prosemd from source.coc.nvimFirst, make sure that you install the prosemd-lsp executable.
You may add prosemd to coc.nvim's config manually in coc-settings.json opened by the
:CocConfig command, like so:
{
"languageserver": {
"prosemd": {
"command": "/usr/local/bin/prosemd-lsp",
"args": ["--stdio"],
"filetypes": ["markdown"],
"trace.server": "verbose",
"settings": {
"validate": true
}
}
}
}
Don't forget to swap out the binary's path at command to where you've installed the prosemd-lsp
executable.
nvim-lspconfigFirst, make sure that you install the prosemd-lsp executable.
You may add prosemd to Neovim's built-in language server
client by adding it to nvim-lspconfig's list of language
servers:
local lsp_configs = require('lspconfig/configs')
lsp_configs.prosemd = {
default_config = {
-- Update the path to prosemd-lsp
cmd = { "/usr/local/bin/prosemd-lsp", "--stdio" },
filetypes = { "markdown" },
root_dir = function(fname)
return lsp_util.find_git_ancestor(fname) or vim.fn.getcwd()
end,
settings = {},
}
}
-- Use your attach function here
local lsp = require('lspconfig')
lsp.prosemd.setup{ on_attach = on_attach }
Don't forget to swap out the binary's path at cmd to where you've installed the prosemd-lsp
executable.