lsp-grammarly
lsp-grammarly copied to clipboard
lsp-mode ❤️ grammarly
lsp-grammarly
lsp-mode
client leveraging grammarly-language-server.
Table of Contents
-
lsp-grammarly
- 💾 Quickstart
- 📇 Commands
- 🔧 Configuration
- 📝 Roadmap
-
💸 Using a Paid Grammarly Account
- 🔍 Method 1: Login with VSCode (easier)
- 🔍 Method 2: Login with Emacs (a bit complicated)
- Authentication from Grammarly website
- Contribute
💾 Quickstart
(use-package lsp-grammarly
:ensure t
:hook (text-mode . (lambda ()
(require 'lsp-grammarly)
(lsp)))) ; or lsp-deferred
📇 Commands
⚠️ Warning
We are moving to the newer grammarly-language-server that uses the official API. Some features are disabled for now, but we will later add them back.
List of commands interact with language server
and Grammarly.com
.
Commands | Description |
---|---|
lsp-grammarly-login | Login to Grammarly.com |
lsp-grammarly-logout | Logout from Grammarly.com |
lsp-grammarly-resume | Start grammarly check for currnet document (buffer) |
lsp-grammarly-pause | Stop grammarly checker from current document (buffer) |
lsp-grammarly-stats | Log out current document status, score , readability , words count , etc. |
🔧 Configuration
lsp-grammarly
supports following configuration. Each configuration is described in
detail in Grammarly Extension Settings.
-
grammarly.patterns
vialsp-grammarly-patterns
-
grammarly.selectors
vialsp-grammarly-selectors
-
grammarly.config.documentDialect
vialsp-grammarly-dialect
-
grammarly.config.documentDomain
vialsp-grammarly-domain
-
grammarly.config.suggestions.ConjunctionAtStartOfSentence
vialsp-grammarly-suggestions-conjunction-at-start-of-sentence
-
grammarly.config.suggestions.Fluency
vialsp-grammarly-suggestions-fluency
-
grammarly.config.suggestions.InformalPronounsAcademic
vialsp-grammarly-suggestions-informal-pronouns-academic
-
grammarly.config.suggestions.MissingSpaces
vialsp-grammarly-suggestions-missing-spaces
-
grammarly.config.suggestions.NounStrings
vialsp-grammarly-suggestions-noun-strings
-
grammarly.config.suggestions.NumbersBeginningSentences
vialsp-grammarly-suggestions-numbers-beginning-sentences
-
grammarly.config.suggestions.NumbersZeroThroughTen
vialsp-grammarly-suggestions-numbers-zero-through-ten
-
grammarly.config.suggestions.OxfordComma
vialsp-grammarly-suggestions-oxford-comma
-
grammarly.config.suggestions.PassiveVoice
vialsp-grammarly-suggestions-passive-voice
-
grammarly.config.suggestions.PersonFirstLanguage
vialsp-grammarly-suggestions-person-first-language
-
grammarly.config.suggestions.PossiblyBiasedLanguageAgeRelated
vialsp-grammarly-suggestions-possibly-biased-language-age-related
-
grammarly.config.suggestions.PossiblyBiasedLanguageDisabilityRelated
vialsp-grammarly-suggestions-possibly-biased-language-disability-related
-
grammarly.config.suggestions.PossiblyBiasedLanguageFamilyRelated
vialsp-grammarly-suggestions-possibly-biased-language-family-related
-
grammarly.config.suggestions.PossiblyBiasedLanguageGenderRelated
vialsp-grammarly-suggestions-possibly-biased-language-gender-related
-
grammarly.config.suggestions.PossiblyBiasedLanguageHumanRights
vialsp-grammarly-suggestions-possibly-biased-language-human-rights
-
grammarly.config.suggestions.PossiblyBiasedLanguageHumanRightsRelated
vialsp-grammarly-suggestions-possibly-biased-language-human-rights-related
-
grammarly.config.suggestions.PossiblyBiasedLanguageLgbtqiaRelated
vialsp-grammarly-suggestions-possibly-biased-language-lgbtqia-related
-
grammarly.config.suggestions.PossiblyBiasedLanguageRaceEthnicityRelated
vialsp-grammarly-suggestions-possibly-biased-language-race-ethnicity-related
-
grammarly.config.suggestions.PossiblyPoliticallyIncorrectLanguage
vialsp-grammarly-suggestions-possibly-politically-incorrect-language
-
grammarly.config.suggestions.PrepositionAtTheEndOfSentence
vialsp-grammarly-suggestions-preposition-at-the-end-of-sentence
-
grammarly.config.suggestions.PunctuationWithQuotation
vialsp-grammarly-suggestions-punctuation-with-quotation
-
grammarly.config.suggestions.ReadabilityFillerwords
vialsp-grammarly-suggestions-readability-fillerwords
-
grammarly.config.suggestions.ReadabilityTransforms
vialsp-grammarly-suggestions-readability-transforms
-
grammarly.config.suggestions.SentenceVariety
vialsp-grammarly-suggestions-sentence-variety
-
grammarly.config.suggestions.SpacesSurroundingSlash
vialsp-grammarly-suggestions-spaces-surrounding-slash
-
grammarly.config.suggestions.SplitInfinitive
vialsp-grammarly-suggestions-split-infinitive
-
grammarly.config.suggestions.StylisticFragments
vialsp-grammarly-suggestions-stylistic-fragments
-
grammarly.config.suggestions.UnnecessaryEllipses
vialsp-grammarly-suggestions-unnecessary-ellipses
-
grammarly.config.suggestions.Variety
vialsp-grammarly-suggestions-variety
-
grammarly.config.suggestions.Vocabulary
vialsp-grammarly-suggestions-vocabulary
📝 Roadmap
List of todos, but I have not got time to implement these features.
- [ ] Create another package that displays information from Grammarly.com
(To display useful information,
score
,readability
,word counts
, etc).
💸 Using a Paid Grammarly Account
You can either login with vscode-grammarly
using VSCode or hit M-x lsp-grammarly-login
. They both share the same credentials
so you can login with either side.
🔍 Method 1: Login with VSCode (easier)
Install VSCode and install extension vscode-grammarly from the extension panel.
Then call command palette (default to Ctrl+Shift+p)
and type to search grammarly login
command.
You should see Grammarly Website and login with your Grammarly account.
🎉 Make sure you click on the button Open Visual Studio Code
. Done! You
can now close VSCode and go back to Emacs!
🔍 Method 2: Login with Emacs (a bit complicated)
⚠️ Warning
This method is no longer working with the new language server and currently WIP, please login with VSCode!
Hit M-x lsp-grammarly-login
and you should see the Grammarly's website pop out
from your favorite browser. See below screenshot,
After login, click the button Open URL:vscode
, If you have VSCode installed, then
this button would be Open Visual Studio Code
instead yet it doesn't matter.
Then click F12 to open the DevTool window. You should able to see an URI like the following
Copy and paste the URI back to Emacs and hit return.
🎉 Done! Now you should be loggin!
Authentication from Grammarly website
Login with your Grammarly account (This step does not require VSCode to be installed)!
Contribute
If you would like to contribute to this project, you may either clone and make pull requests to this repository. Or you can clone the project and establish your own branch of this tool. Any methods are welcome!