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

When used on a line with flycheck error, lsp-ui can add an empty line before the popup #1292

Closed
zw963 opened this issue Jan 7, 2022 · 8 comments

Comments

@zw963
Copy link
Contributor

zw963 commented Jan 7, 2022

image

I create a issue here too, but i consider maybe this is a company issue?

@zw963
Copy link
Contributor Author

zw963 commented Jan 7, 2022

BTW, i can saw candidate is visible at first, but then disappear after a flash

@dgutov
Copy link
Member

dgutov commented Jan 8, 2022

You should probably file it with lsp-mode first. Perhaps they have some ideas.

But also see #1285 which seems related, and the author ended up finding something in their config (or maybe an additional package) which caused the problem.

@zw963
Copy link
Contributor Author

zw963 commented Jan 9, 2022

Okay, i try reproduce this issue use a minimum config, and finally, i find out the reason cause this:

(setq truncate-partial-width-windows t)

When above variable set to t, i can reproduce this behavior.

When i comment it out to use default value nil, i can get following strange behavior.

if i entering then remove File frequently, it give me two different UI, randomly, like following

image


As you can see, it add a blank line after File.

image

this issue seem like only happen when File is entering at the beginning of the line(although, i am not sure), but the fact is, it never happen when it complete on following position.

image

I can reproduce this issue even no flycheck or enable my theme, so, i will create a issue LSP there, and reference this, thank you.

@zw963
Copy link
Contributor Author

zw963 commented Jan 9, 2022

This issue should not related to company? i guess, it caused by following config:

  1. enable lsp action UI use (setq lsp-ui-sideline-show-code-actions t)
  2. (setq truncate-partial-width-windows t)
  3. ensure to open treemacs when try to reproduce this issue.

So, closing it ...

@zw963 zw963 closed this as completed Jan 9, 2022
@dgutov dgutov reopened this Jan 9, 2022
@dgutov
Copy link
Member

dgutov commented Jan 9, 2022

Thanks for the investigation. There might be something we can/should fix here.

Can you reproduce this with the latest Company master? Which version are you using?

Can you reproduce this without LSP? Say, inside an .el file? Or with some other built-in backend?

Does Flycheck have to be enabled? Does it happen with Flymake too?

@zw963
Copy link
Contributor Author

zw963 commented Jan 9, 2022

Can you reproduce this with the latest Company master? Which version are you using?

Yes, i use f481c1e

Can you reproduce this without LSP? Say, inside an .el file? Or with some other built-in backend?

No, In fact, i guess because some config issue, company no meanful candidate for most of my code, i still try figure those things out, but, anyway, i test it company-robe source in enh-ruby-mode, and .el, never this issue happen, i think this issue only take effect by lsp-ui.

Does Flycheck have to be enabled? Does it happen with Flymake too?

Yes, it can reproduce when work with builtin flymake.

BTW, this issue moved by lsp maintainer into lsp-ui, emacs-lsp/lsp-ui#679

and @yyoncho said, using company-posframe will fix the issue, though, i still never try it.

@zw963
Copy link
Contributor Author

zw963 commented Jan 9, 2022

BTW, company-posframe work quite well for this cases

image

@dgutov
Copy link
Member

dgutov commented Jan 9, 2022

company-posframe work quite well for this cases

Yes, of course. It uses a child frame, so it's not affected by any buffer contents.

Anyway, it seems like a company<->lsp-ui conflict, rather that a fundamental bug here. Let's see if lsp-ui's maintainers will have any further ideas. Thanks.

@dgutov dgutov changed the title When use company with lsp, flycheck make the first(default selected) cadicate invisible. When use company with lsp-ui, flycheck adds an empty line before the popup Jan 9, 2022
@dgutov dgutov changed the title When use company with lsp-ui, flycheck adds an empty line before the popup When used on a line with flycheck error, lsp-ui can add an empty line before the popup Jan 9, 2022
@dgutov dgutov closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants