TerminalFi / LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
658 stars 25 forks source link

popup width #117

Open cotcomsol opened 1 year ago

cotcomsol commented 1 year ago

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

TerminalFi commented 1 year ago

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.

timfjord commented 1 year ago

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

TerminalFi commented 6 months ago

After months, releasing this within the week

WangWei90 commented 4 months ago

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?

timfjord commented 4 months ago

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

WangWei90 commented 4 months ago

Thank you~ @timfjord

I will try to test this later.

TerminalFi commented 3 months ago

@cotcomsol Is this still desired?

cotcomsol commented 3 months ago

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

TerminalFi commented 3 months ago

or maybe we show it when the time elapses a thrshold

Wrong thread :)

jfcherng commented 2 months ago

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 commented 2 months ago

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

TerminalFi commented 2 months ago

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

jfcherng commented 2 months ago

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

TerminalFi commented 2 months ago

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 commented 2 months ago

Actually, I had local changes!

We do need to expose max_width and max_height as well.

TerminalFi commented 2 months ago

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


        "completion_popup_max_height": "240",
        "completion_popup_max_width": "640",
jfcherng commented 2 months ago

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

TerminalFi commented 2 months ago

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

jfcherng commented 2 months ago

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