LSP-copilot icon indicating copy to clipboard operation
LSP-copilot copied to clipboard

popup width

Open cotcomsol opened this issue 1 year ago • 19 comments

Is there a way to change the popup width? So far I have been unable to find a setting. On my system it always shows up too narrow and the completions are cut off. My sublime window in this screenshot is over 3000 pixels wide so plenty of space for it to display the full completion if it just made the popup wider. Screenshot_2023-08-07_09-06-29

cotcomsol avatar Aug 07 '23 15:08 cotcomsol

The short answer, not currently. The long answer is it is possible to make this user a user configuration. But not sure if it is really a high priority. But I do see how this can make it not as usable.

TerminalFi avatar Aug 07 '23 21:08 TerminalFi

Just a note, you could use

"settings": {
  "completion_style": "phantom"
}

to have a VSCode-like completion style. But please note it is a bit buggy

timfjord avatar Aug 10 '23 10:08 timfjord

After months, releasing this within the week

TerminalFi avatar Mar 27 '24 00:03 TerminalFi

Just a note, you could use

"settings": {
  "completion_style": "phantom"
}

to have a VSCode-like completion style. But please note it is a bit buggy

Can the "phantom" be setup with a different background color, can the "phantom" use the upright style?

WangWei90 avatar May 12 '24 17:05 WangWei90

@WangWei90 I don't think we set the background colour explicitly, but since the package follows the best practices it should be possible to customize it if needed.

I'm not sure what the upright style means though. But if it is about styling, then it should be possible to customize it too.

timfjord avatar May 13 '24 14:05 timfjord

Thank you~ @timfjord

I will try to test this later.

WangWei90 avatar May 14 '24 09:05 WangWei90

@cotcomsol Is this still desired?

TerminalFi avatar Jul 02 '24 03:07 TerminalFi

It would definitely be helpful for me. I find that most of the time the completion is cut off and so mostly useless.

cotcomsol avatar Jul 02 '24 22:07 cotcomsol

or maybe we show it when the time elapses a thrshold

Wrong thread :)

TerminalFi avatar Jul 03 '24 00:07 TerminalFi

Hey @TerminalFi are you going to review https://github.com/TerminalFi/LSP-copilot/pull/178 ? I see you close this issue without merging that PR.

jfcherng avatar Jul 08 '24 13:07 jfcherng

Hmm... I guess #178 won't help. The popup width is provided as an argument to a ST plugin API.

jfcherng avatar Jul 08 '24 13:07 jfcherng

It helps, I'll post example. I've tested this already.

TerminalFi avatar Jul 08 '24 13:07 TerminalFi

It helps, I'll post example. I've tested this already.

Oops, I thought it's because of https://github.com/TerminalFi/LSP-copilot/blob/fa70eafc1916737bf623480497ef34dcae61d1e1/plugin/ui/completion.py#L244

jfcherng avatar Jul 08 '24 13:07 jfcherng

It helps, I'll post example. I've tested this already.

Oops, I thought it's because of https://github.com/TerminalFi/LSP-copilot/blob/fa70eafc1916737bf623480497ef34dcae61d1e1/plugin/ui/completion.py#L244

That's just passed as CSS I believe. But either way, I'll post example

TerminalFi avatar Jul 08 '24 13:07 TerminalFi

Actually, I had local changes!

We do need to expose max_width and max_height as well.

TerminalFi avatar Jul 08 '24 14:07 TerminalFi

@jfcherng we can either set higher defaults or create new settings


		"completion_popup_max_height": "240",
		"completion_popup_max_width": "640",

TerminalFi avatar Jul 08 '24 14:07 TerminalFi

Will it work if we hard-code it like max_width=9999 and limit it with CSS?

jfcherng avatar Jul 08 '24 14:07 jfcherng

No, that will only limited the actual rendered content and not the popup itself.

TerminalFi avatar Jul 08 '24 15:07 TerminalFi

@jfcherng we can either set higher defaults or create new settings


		"completion_popup_max_height": "240",
		"completion_popup_max_width": "640",

Then yes, I think we have no choice.

jfcherng avatar Jul 08 '24 15:07 jfcherng