cspell-lsp-wrapper
v1.0.6
Published
lsp wrapper for cspell
Downloads
115
Maintainers
Readme
cspell LSP wrapper
To use with neovim
- Install using
npm i -g cspell-lsp-wrapper
- Add this to setup the client for neovim
vim.api.nvim_create_autocmd('FileType', {
pattern = {
"markdown", "text", "plaintext", "md", "html", "xml", "json", "yaml", "toml", "javascript", "typescript",
"javascriptreact", "typescriptreact", "css", "scss", "less", "vue", "svelte", "go", "python", "lua",
"c", "cpp", "java", "php", "ruby", "rust", "bash", "sh", "dockerfile", "sql"
},
callback = function()
vim.lsp.start({
name = "cspell",
cmd = { "cspell-lsp-wrapper", "--stdio" },
root_dir = vim.fn.getcwd(),
init_options = {
home = vim.fn.stdpath('config')
},
})
end,
})
Build from source
git clone https://github.com/salihdhaifullah/cspell-lsp.git
cd ./cspell-lsp
pnpm i
pnpm build
-- Change this line to point to the new build
cmd = { "node", "/path/to/cspell-lsp/dist/server.js", "--stdio" },