Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

henrybarreto/languagetool-lsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LanguageTool Language Server

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, a multilingual grammar, style, and spell checker what is used by millions of people around the world.

Features

  • check for errors in the file
    • check for errors in strings
      • ""
      • ''
      • \``
      • add more...
    • check for errors in comments
      • //
      • /* */
      • 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.

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.

npm run dev

As it uses the LanguageTool as the service to perform the text analysis, so you should have a clone 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.

npm run server

In order maintain a pattern on the code, there is a fmt command to format all Typescripts inside the src/.

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)

Using the basic of LLS on nvim with coc.nvim, just type :CocConfig and add the code's snippet below to it:

{
	"languageserver": {
		"languagetool-language-server": {
			"module": "<path>/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 to get information and tips to help to complete your task.

About

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

Topics

Resources

License

Stars

Watchers

Forks