lsp-grammarly
lsp-grammarly copied to clipboard
wrong code action is shown, instead of that for cursor location
see attached screen shot. when there is a paragraph with a few errors, placing the cursor on one of them shows a code action relevant to another error.

I think this is the feature from the upstream lsp-ui? By seeing the code lsp-ui-sideline.el#L85-L93 here; try set the variable (setq lsp-ui-sideline-update-mode 'point).
thanks for the response! It seems this is not the issue, for the following two reasons: (1) Looks like I already have it as 'point: lsp-ui-sideline-update-mode is a variable defined in ‘lsp-ui-sideline.el’. Its value is ‘point’. (2) if I list actions without using lsp-ui, it still lists the actions for the wrong error, not for the one where the cursor is located.
turns out this is indeed upstream. not lsp-ui, but generally an lsp-mode issue. https://github.com/emacs-lsp/lsp-mode/issues/3442
Sorry for the off-topic but how do you enable showing actions as in the screenshot? In my case, it just shows the diagnostic message and the only way to find actions is to click on the lightbulb on the toolbar. Yet in both cases it shows actions for both errors on the same line.
Hi, you use lsp-ui, I have: '(lsp-ui-doc-enable nil) '(lsp-ui-sideline-show-code-actions t) '(lsp-ui-sideline-wait-for-all-symbols nil) happy to provide further detail if needed, E
On Mon, Apr 18, 2022 at 2:28 PM Vadim Zaliva @.***> wrote:
Sorry for the off-topic but how do you enable showing actions as in the screenshot? In my case, it just shows the diagnostic message and the only way to find actions is to click on the lightbulb on the toolbar. Yet in both cases it shows actions for both errors on the same line.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
@eli-tziperman thanks. I've set the variables you mentioned, but yet it does not show actions. Here is a screenshot:

Here is my .emacs: https://github.com/vzaliva/scripts_and_configs/blob/master/configs/.emacs
I appreciate any help.
did you install lsp-ui?
On Mon, Apr 18, 2022 at 4:18 PM Vadim Zaliva @.***> wrote:
@eli-tziperman https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_eli-2Dtziperman&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=lizgrVC3n_foQ8PRgrPWaFUFDGr6NB2UF5setOoecZa6vf7txztdantRyMvyIZv2&s=R8GxRDRoTSixRDH8pHdLWyvFlUVWicN8ceUMwjYRlWU&e= thanks. I've set the variables you mentioned, but yet it does not show actions. Here is a screenshot: [image: image] https://urldefense.proofpoint.com/v2/url?u=https-3A__user-2Dimages.githubusercontent.com_86581_163871044-2Dfed7881f-2D2f34-2D48da-2Daf83-2Db0cc29a64ac2.png&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=lizgrVC3n_foQ8PRgrPWaFUFDGr6NB2UF5setOoecZa6vf7txztdantRyMvyIZv2&s=ZsKLyc7VX6ZXi76epCseF2MLnNMIAVY2ABv2be1ndW8&e=
Here is my .emacs: https://github.com/vzaliva/scripts_and_configs/blob/master/configs/.emacs https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_vzaliva_scripts-5Fand-5Fconfigs_blob_master_configs_.emacs&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=lizgrVC3n_foQ8PRgrPWaFUFDGr6NB2UF5setOoecZa6vf7txztdantRyMvyIZv2&s=rgkuSINmVG0tC-K0C1WhPb0fHPULisxvosf49uwaqVE&e=
I appreciate any help.
— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_emacs-2Dgrammarly_lsp-2Dgrammarly_issues_27-23issuecomment-2D1101726983&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=lizgrVC3n_foQ8PRgrPWaFUFDGr6NB2UF5setOoecZa6vf7txztdantRyMvyIZv2&s=8pXKLNeVJVfbl6XMAwTUZ9XldTK9Hg6fwvVo7fhXWiw&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ADLJH552QDGMZ4J3ZOF7O3DVFW7PFANCNFSM5SHIYHCQ&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=lizgrVC3n_foQ8PRgrPWaFUFDGr6NB2UF5setOoecZa6vf7txztdantRyMvyIZv2&s=B-htW2qTr3up_xMaeiVwG2K6I_3HPa_yBPpKamsl8Uo&e= . You are receiving this because you were mentioned.Message ID: @.***>
@eli-tziperman yes, of course. lsp-ui is installed.
I see that I also have (defun my-grammarly-setup () (require 'lsp-grammarly) (setq username user-login-name) (setq grammarly-password "XX") (setq grammarly-username @.***") (add-hook 'latex-mode-hook (lambda () (lsp))) (add-hook 'text-mode-hook (lambda () (lsp))) (setq lsp-headerline-breadcrumb-enable nil) ) (my-grammarly-setup) admittedly not sure if that's relevant...
On Mon, Apr 18, 2022 at 5:08 PM Vadim Zaliva @.***> wrote:
@eli-tziperman https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_eli-2Dtziperman&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=wuDFmMyoGJacARLrMRy1sjWIs9q8LLPymD2Rxes1MS5n_s8jmH6T5V4HWbFMD52J&s=C3iVA_U78396ANCFh_XccB8LvG6ZAvKkUEece9C6xS0&e= yes, of course. lsp-ui is installed.
— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_emacs-2Dgrammarly_lsp-2Dgrammarly_issues_27-23issuecomment-2D1101769168&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=wuDFmMyoGJacARLrMRy1sjWIs9q8LLPymD2Rxes1MS5n_s8jmH6T5V4HWbFMD52J&s=rrG1Tm-gUYClIsQaegFqdMfuALeCJNYZi-ZYnACS53I&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ADLJH566TQZTKQ2EYSFTRWLVFXFMHANCNFSM5SHIYHCQ&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=KYyaxH1lmVR4t1SuGeFOBHWryGg1z4AMCHouqjrz7Hg&m=wuDFmMyoGJacARLrMRy1sjWIs9q8LLPymD2Rxes1MS5n_s8jmH6T5V4HWbFMD52J&s=YXwevLuSYFzDtvaXL2_vc8gznP3ljF5mbeZrUDVQZCk&e= . You are receiving this because you were mentioned.Message ID: @.***>