https://github.com/henrybarreto/languagetool-lsp
LanguageTool Language Server is an implementation of Language Server Protocol to enable proofreading/text analysis like great IDEs to any text editor what supports LSP using the LanguageTool
https://github.com/henrybarreto/languagetool-lsp
hackertoberfest languagetool lsp nvim proofread vscode
Last synced: about 1 year ago
JSON representation
LanguageTool Language Server is an implementation of Language Server Protocol to enable proofreading/text analysis like great IDEs to any text editor what supports LSP using the LanguageTool
- Host: GitHub
- URL: https://github.com/henrybarreto/languagetool-lsp
- Owner: henrybarreto
- License: mit
- Archived: true
- Created: 2022-10-08T12:42:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-10T22:01:05.000Z (over 3 years ago)
- Last Synced: 2025-04-22T17:12:16.329Z (about 1 year ago)
- Topics: hackertoberfest, languagetool, lsp, nvim, proofread, vscode
- Language: TypeScript
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LanguageTool Language Server
LanguageTool Language Server is an implementation of [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) to enable proofreading/text analysis like great IDEs to any text editor what supports LSP using the [LanguageTool](https://github.com/languagetool-org/languagetool), a multilingual grammar, style, and spell checker what is used by millions of people around the world.
## Features
- [ ] check for errors in the file
- [x] check for errors in strings
- [x] `""`
- [x] `''`
- [x] ` \`` `
- add more...
- [x] check for errors in comments
- [x] `//`
- [x] `/* */`
- add more...
- [ ] use suggestions to text fix
- [ ] add and remove words from dictionary
## Commands
Building the project to test requires that you run the `build` script. It will convert the Typescripts files on `src/` to JavaScript on `build/` and runnable on NodeJS vanilla.
```sh
npm run build
```
If you are working on the Typescript files, you should want to build it automatically, so run the `dev` command, what will generate, on each change, the files on `build/` folder.
```sh
npm run dev
```
As it uses the LanguageTool as the service to perform the text analysis, so you should have a [clone](https://microsoft.github.io/language-server-protocol/) of its project inside the `bin/` folder. Check the NPM 's `server` command on `package.json` file to more information. This command will start a new server of LanguageTool to receive the requests sent by LLS.
```sh
npm run server
```
In order maintain a pattern on the code, there is a `fmt` command to format all Typescripts inside the `src/`.
```sh
npm run fmt
```
## Usage
After the `build/` folder was generated by `build` or `dev` commands, you are able to use the LLS on your editor.
### nvim ([coc.nvim](https://github.com/neoclide/coc.nvim))
Using the basic of LLS on nvim with `coc.nvim`, just type `:CocConfig` and add the code's snippet below to it:
```json
{
"languageserver": {
"languagetool-language-server": {
"module": "/languagetool-language-server/build/index.js",
"args": ["--node-ipc"],
"filetypes": ["*"],
"initializationOptions": {
}
}
}
}
```
#### Development
If you want to improve the LanguageTool Language Server on its integration with `coc.nvim`, check its page of [Debug language server](https://github.com/neoclide/coc.nvim/wiki/Debug-language-server) to get information and tips to help to complete your task.