Giter Site home page Giter Site logo

Comments (13)

hongyi-zhao avatar hongyi-zhao commented on May 20, 2024 2

Try adding up the time flycheck-grammarly-check-time may help avoid duplicate messages.

Thank you, it seems the following configuration does the trick:

(use-package flycheck-grammarly
    :config
     (setq flycheck-grammarly--show-debug-message t
           flycheck-grammarly-check-time 2))

I would recommend you try lsp-grammarly, it's quite nice and fast in terms of speed.

Thank you. I’ll give it a shot.

from flycheck-grammarly.

hongyi-zhao avatar hongyi-zhao commented on May 20, 2024 1

Did you start M-x flycheck-mode?

I enabled flycheck-mode globally by default:

(use-package flycheck
   ;:hook (after-init . global-flycheck-mode)
   ;https://www.flycheck.org/en/latest/user/installation.html#use-package
   :init (global-flycheck-mode)
   :config
    (flycheck-add-mode 'tex-chktex 'latex-mode)
    (flycheck-add-mode 'tex-lacheck 'latex-mode)
   :bind (:map flycheck-mode-map
              ("M-n" . flycheck-next-error)
              ("M-p" . flycheck-previous-error)))

from flycheck-grammarly.

jcs090218 avatar jcs090218 commented on May 20, 2024

Thanks for reporting the issue to us!

The support major modes is defined here. You can either customize the variable flycheck-grammarly-active-modes or to run flycheck-grammarly in the valid file type. (.txt, .md, etc)

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

Make sure you have (require 'flycheck-grammarly) inside your configuration since use-package doesn't load it for you!

from flycheck-grammarly.

hongyi-zhao avatar hongyi-zhao commented on May 20, 2024

The support major modes is defined here.

I'm using AUCTeX, whose major mode, i.e., latex-mode is among the predefined supported major modes by flycheck-grammarly, as shown below:

image

Make sure you have (require 'flycheck-grammarly) inside your configuration since use-package doesn't load it for you!

I'm using straight.el, which will autoload the required feature. At the same time, I've already enabled its integration-with-use-package feature. Therefore, there is no need to explicitly use (require 'flycheck-grammarly) here.

from flycheck-grammarly.

jcs090218 avatar jcs090218 commented on May 20, 2024

Oh, okay. This may duplicate to #7?

Sorry that this plugin isn't fully support latex file yet. Can you try with other text file? You can try to set flycheck-grammarly--show-debug-message to t in order to see the debug information.

from flycheck-grammarly.

hongyi-zhao avatar hongyi-zhao commented on May 20, 2024

I tried with the following configuration:

(use-package flycheck-grammarly)
(setq flycheck-grammarly--show-debug-message t)

And then open a md file, but still failed to see any effect, as shown below:

image

from flycheck-grammarly.

jcs090218 avatar jcs090218 commented on May 20, 2024

Did you start M-x flycheck-mode? Just to confirm. 😕

from flycheck-grammarly.

jcs090218 avatar jcs090218 commented on May 20, 2024

(setq flycheck-grammarly--show-debug-message t)

Try toggle M-x flycheck-mode manually, you should able to see message like

[INFO] Start connecting to Grammarly API...

Give it some time since it sents network request to Grammarly API.


Sorry I don't use straight.el and you mentioned autoload, does it do the same with (require 'flycheck-grammarly)? 😕 Try print out flycheck-checkers and make sure grammarly checker is in there.

from flycheck-grammarly.

hongyi-zhao avatar hongyi-zhao commented on May 20, 2024

Try toggle M-x flycheck-mode manually,

It has already been enabled by default, so M-x flycheck-mode will disable it in the current buffer:

image

Sorry I don't use straight.el and you mentioned autoload, does it do the same with (require 'flycheck-grammarly)?

I use it widely for all of my routine packages autoloading.

confused Try print out flycheck-checkers and make sure grammarly checker is in there.

image

It seems that the connection to Grammarly API has been established successfully, but I just can't see the checking results:

image

from flycheck-grammarly.

jcs090218 avatar jcs090218 commented on May 20, 2024

I think this issue is from #3. I have applied a fix with 5568fea.

Let me know if it works!

from flycheck-grammarly.

hongyi-zhao avatar hongyi-zhao commented on May 20, 2024

Yes:

image

But:

  1. Sometimes the same suggestion info will appear more than once.
  2. The response is very slow.
  3. It doesn't give a correction hint.

from flycheck-grammarly.

jcs090218 avatar jcs090218 commented on May 20, 2024

The performance is mentioned in our todo list section flycheck-grammarly#todo-list.

Try adding up the time flycheck-grammarly-check-time may help avoid duplicate messages.

Edit: Make sure you don't load flycheck-grammarly more than once due to the following code, or else it would try to highlight the error multiple times.

(add-to-list 'flycheck-checkers 'grammarly)
(add-to-list 'grammarly-on-open-function-list 'flycheck-grammarly--on-open)
(add-to-list 'grammarly-on-message-function-list 'flycheck-grammarly--on-message)
(add-to-list 'grammarly-on-close-function-list 'flycheck-grammarly--on-close)

from flycheck-grammarly.

jcs090218 avatar jcs090218 commented on May 20, 2024

I would recommend you try lsp-grammarly, it's quite nice and fast in terms of speed.

from flycheck-grammarly.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.