From 49c6fd5aaacda51a598ee44c901647db84c02eda Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Sun, 18 Dec 2022 08:46:53 -0500 Subject: [PATCH] Add configuration information for use with Neovim Your LSP works well with Neovim, and this PR provides a working configuration block. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4aae8b22f..d4d4fa501 100755 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This project uses [pnpm](https://pnpm.io). ```sh pnpm install pnpm run build +pnpm test ``` ## Adding support for new language @@ -21,6 +22,19 @@ pnpm run build 1. Create `Language.ts` 2. For reference, check [`LanguageHTML.ts`](./packages/grammarly-languageserver/src/languages/LanguageHTML.ts) +## Using this LSP with Neovim +After running the `pnpm install`, `pnpm run build`, and `pnpm test` commands the LSP is ready to be used with Neovim. Add this setup to your Neovim config (replacing the path to the `grammarly-languageserver` with your build): + +```lua +require'lspconfig'.grammarly.setup({ + cmd = { "/home/droscigno/GitHub/grammarly/extension/node_modules/.bin/grammarly-languageserver", "--stdio" }, + filetypes = { "markdown", "text" }, + init_options = { + clientId = 'client_BaDkMgx4X19X9UxxYRCXZo', + }, +}) +``` + ## How to get help Have a question, or want to provide feedback? Use [repository discussions](https://github.com/znck/grammarly/discussions) to ask questions, share bugs or feedback, or chat with other users.