diff options
| author | Matthew Toohey <contact@mtoohey.com> | 2021-12-19 19:01:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-19 16:01:54 -0800 |
| commit | fcd5fbe291c3b5f2708cae7a941239844648d7e7 (patch) | |
| tree | 10fcefbb327b9384dd8321146a7b35ddff32af0f | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-fcd5fbe291c3b5f2708cae7a941239844648d7e7.tar nvim-lspconfig-fcd5fbe291c3b5f2708cae7a941239844648d7e7.tar.gz nvim-lspconfig-fcd5fbe291c3b5f2708cae7a941239844648d7e7.tar.bz2 nvim-lspconfig-fcd5fbe291c3b5f2708cae7a941239844648d7e7.tar.lz nvim-lspconfig-fcd5fbe291c3b5f2708cae7a941239844648d7e7.tar.xz nvim-lspconfig-fcd5fbe291c3b5f2708cae7a941239844648d7e7.tar.zst nvim-lspconfig-fcd5fbe291c3b5f2708cae7a941239844648d7e7.zip | |
feat: add grammarly support (#1562)
| -rw-r--r-- | lua/lspconfig/server_configurations/grammarly.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/grammarly.lua b/lua/lspconfig/server_configurations/grammarly.lua new file mode 100644 index 00000000..310f903d --- /dev/null +++ b/lua/lspconfig/server_configurations/grammarly.lua @@ -0,0 +1,31 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'unofficial-grammarly-language-server', '--stdio' }, + filetypes = { 'markdown' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + handlers = { + ['$/updateDocumentState'] = function() + return '' + end, + }, + }, + docs = { + description = [[ +https://github.com/emacs-grammarly/unofficial-grammarly-language-server + +`unofficial-grammarly-language-server` can be installed via `npm`: + +```sh +npm i -g @emacs-grammarly/unofficial-grammarly-language-server +``` + +WARNING: Since this language server uses Grammarly's API, any document you open with it running is shared with them. Please evaluate their [privacy policy](https://www.grammarly.com/privacy-policy) before using this. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} |
