Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong code action is shown, instead of that for cursor location #27

Open
eli-tziperman opened this issue Apr 1, 2022 · 9 comments
Open
Labels

Comments

@eli-tziperman
Copy link

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.
Screen Shot 2022-03-31 at 10 15 47 PM

@jcs090218
Copy link
Member

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).

@eli-tziperman
Copy link
Author

eli-tziperman commented Apr 1, 2022

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.

@eli-tziperman
Copy link
Author

turns out this is indeed upstream. not lsp-ui, but generally an lsp-mode issue.
emacs-lsp/lsp-mode#3442

@vzaliva
Copy link

vzaliva commented Apr 18, 2022

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.

@eli-tziperman
Copy link
Author

eli-tziperman commented Apr 18, 2022 via email

@vzaliva
Copy link

vzaliva commented Apr 18, 2022

@eli-tziperman thanks. I've set the variables you mentioned, but yet it does not show actions. Here is a screenshot:
image

Here is my .emacs: https://github.com/vzaliva/scripts_and_configs/blob/master/configs/.emacs

I appreciate any help.

@eli-tziperman
Copy link
Author

eli-tziperman commented Apr 18, 2022 via email

@vzaliva
Copy link

vzaliva commented Apr 18, 2022

@eli-tziperman yes, of course. lsp-ui is installed.

@eli-tziperman
Copy link
Author

eli-tziperman commented Apr 18, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants