Skip to content

Commit

Permalink
Rename to active modes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Apr 4, 2021
1 parent e2df588 commit 038670c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lsp-grammarly.el
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,15 @@ This is only for development use."
:type 'string
:group 'lsp-grammarly)

(defcustom lsp-grammarly-modes
(defcustom lsp-grammarly-active-modes
'(text-mode latex-mode org-mode markdown-mode)
"List of major mode that work with Grammarly."
:type 'list
:group 'lsp-grammarly)

(define-obsolete-variable-alias
'lsp-grammarly-modes 'lsp-grammarly-active-modes "0.2.1")

(defcustom lsp-grammarly-auto-activate t
"Enable Grammarly service when a supported document is opened."
:type 'boolean
Expand Down Expand Up @@ -247,7 +250,7 @@ For argument CALLBACK, see object `lsp--client' description."
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection #'lsp-grammarly--server-command)
:activation-fn (lambda (&rest _) (apply #'derived-mode-p lsp-grammarly-modes))
:activation-fn (lambda (&rest _) (apply #'derived-mode-p lsp-grammarly-active-modes))
:priority -1
:server-id 'grammarly-ls
:download-server-fn (lambda (_client callback error-callback _update?)
Expand Down

0 comments on commit 038670c

Please sign in to comment.