lsp-grammarly icon indicating copy to clipboard operation
lsp-grammarly copied to clipboard

Newlines affect suggestions

Open fcdimitr opened this issue 1 year ago • 5 comments

Hello and thank you for this package!

I have experienced the following issue. When splitting a sentence across multiple lines (I have been using auto-fill in my buffers) the suggestions are wrong.

MWE:

The successive construction of the model from finer to coarser blocks not only improves the efficiency but also increases the quality.
The successive construction of the model from finer to coarser 
blocks not only improves the efficiency but also increases the 
quality.

The first example raises no issues. In the second case, I get errors on improves and increases because it identifies the blocks as the subject.

Is there any way to remove single-line breaks from the parser?

Thanks!

fcdimitr avatar Aug 07 '22 12:08 fcdimitr

Thanks for the bug report! ❤️

Hmm... I am not able to reproduce this error. I have tested on both Emacs (lsp-grammarly) and VSCode, but neither of them can reproduce this error. Can you place the recipe to reproduce this? Thanks!

jcs090218 avatar Aug 07 '22 14:08 jcs090218

I am testing on Emacs (lsp-grammarly) on macOS; I am using doom-emacs as my emacs setup.

I am adding the output of doom info

generated  Aug 07, 2022 18:02:22
system     MacOS 11.6.7 Darwin 20.6.0 x86_64
emacs      28.1 ~/.emacs.d/ -> ~/.emacs.d/
doom       3.0.0-dev HEAD -> master, origin/master, origin/HEAD 33c5f3721
	   2022-07-09 21:10:40 +0200 ~/.doom.d/ -> ~/.doom.d/
shell      /bin/zsh
features   ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER THREADS
	   TOOLKIT_SCROLL_BARS XIM ZLIB
traits     batch server-running envvar-file
modules    :completion company (vertico +icons) :ui doom doom-dashboard hl-todo
	   minimap modeline ophints (popup +defaults) treemacs vc-gutter
	   vi-tilde-fringe workspaces :editor file-templates snippets :emacs
	   (dired +icons) electric vc :term vterm :checkers syntax (spell
	   +flyspell) :tools (eval +overlay) lookup lsp magit :os macos :lang
	   (cc +lsp) emacs-lisp julia latex markdown org sh web yaml :config
	   (default +bindings +smartparens)
packages   (lsp-grammarly) (julia-snail) (julia-repl :disable t) (matlab-mode)

I am adding a screenshot of my Emacs buffer.

Screen Shot 2022-08-07 at 18 04 06

fcdimitr avatar Aug 07 '22 15:08 fcdimitr

Thanks for the screenshot and information! These really help a lot! ❤️

Can you also try it in VSCode? If it produces the same result, I think the culprit should be the upstream (language server).

jcs090218 avatar Aug 07 '22 15:08 jcs090218

I tried VSCode, it produces the same result.

Screen Shot 2022-08-08 at 11 44 29

Any ideas where to forward this issue? Thanks!

fcdimitr avatar Aug 08 '22 08:08 fcdimitr

It seems like an upstream issue, you can post an issue in https://github.com/znck/grammarly (this is their link).

Before you do, make sure you are using the latest lsp-grammarly and language server. Thanks! ❤️

jcs090218 avatar Aug 08 '22 10:08 jcs090218

This seems like an upstream issue, so I am closing this now! Thanks for reporting this issue! :)

jcs090218 avatar Oct 21 '22 07:10 jcs090218