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

swiper affected by lsp-lens-mode and visual-line-mode #2951

Open
peterbecich opened this issue Jan 29, 2022 · 0 comments
Open

swiper affected by lsp-lens-mode and visual-line-mode #2951

peterbecich opened this issue Jan 29, 2022 · 0 comments

Comments

@peterbecich
Copy link

peterbecich commented Jan 29, 2022

It appears that visual-line-mode and lsp-lens-mode (https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-lens.el) have an effect on Swiper.
Both visual-line-mode and lsp-lens-mode must be enabled to demonstrate this.

Here is the correct behavior of Swiper, with either visual-line-mode and/or lsp-lens-mode disabled.
I search for the term QueryParam and it highlights the two occurrences. I can jump to either occurrence:

query_param_correct

Now I enable visual-line-mode and lsp-lens-mode.
Here are two Lenses which add up to about 30 lines:

lens_offset

I search for QueryParam again. The two instances are correctly highlighted. However, jumping lands on the wrong location. The wrong location is offset by the lines of the lenses. Here is jumping to the first occurrence of QueryParam:
query_param_1

And the second occurrence:
query_param_2

Here is the file: https://github.com/peterbecich/servant-ekg/blob/6dc27930c34f38ee391a1d4d57dc436438abddd0/lib/Servant/Ekg.hs#L120
These screenshots were produced with an isolated environment, lsp-start-plain.

Built-in I-search is unaffected by this. Do you think it is better to open this issue in https://github.com/emacs-lsp/lsp-mode?

This issue is similar but smaller, and does not pertain to Swiper: emacs-lsp/lsp-mode#3329 But I wonder if the underlying cause may be the same.

Thank you

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

No branches or pull requests

1 participant