Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Add configuration information for use with Neovim #336

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This project uses [pnpm](https://pnpm.io).
```sh
pnpm install
pnpm run build
pnpm test
```

## Adding support for new language
Expand All @@ -21,6 +22,19 @@ pnpm run build
1. Create `Language<LanguageName>.ts`
2. For reference, check [`LanguageHTML.ts`](./packages/grammarly-richtext-encoder/src/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.
Expand Down