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

No Suggestions in New Tab (Untitled File)

Open guplem opened this issue 10 months ago • 3 comments

Description

When using LSP-copilot in Sublime Text, no suggestions appear if the user is in a "new tab" (i.e., an untitled file that hasn't been saved yet). This happens even when the extension is properly configured and working in regular files.

Steps to Reproduce

  1. Open Sublime Text.
  2. Open a new tab (without saving it as a file).
  3. Start typing.
  4. Observe that no Copilot suggestions appear.

Expected Behavior

Copilot should provide suggestions in new, unsaved tabs, just like it does in saved files.

Actual Behavior

No suggestions appear until the file is saved.

Environment

  • OS: Windows 11 24H2
  • Sublime Text Version: 4192
  • LSP-copilot Version: 0.3.5
  • LSP Version: 2.3.0

Additional Notes

I have phantom suggestions enabled.

If this is a limitation due to LSP, I suppose there is not much it can be done...

guplem avatar Jan 31 '25 10:01 guplem

It's known that LSP won't work on the initial buffer of a new window. But I am not sure whether this is what you mean.

If people want to reproduce, here are steps.

  1. ctrl+shift+n to create a new window
  2. LSP won't work on the initial buffer of the new window. You may manually set the syntax of the initial buffer to see whether other LSP-* works. LSP-* doesn't work on my side.

jfcherng avatar Jan 31 '25 14:01 jfcherng

Hi! I do not understand some stuff, like I do not know what exactly is the "initial buffer" nor what you mean here:

You may manually set the syntax of the initial buffer to see whether other LSP-* works. LSP-* doesn't work on my side.

However, what I am talking about is not even with "new window" but "new tab" (ctrl+n) as well.

But If I am not mistaken, what you are trying to say is that is not a LSP-copilot's issue but a "general LSP" issue, right?

guplem avatar Feb 02 '25 16:02 guplem

what you are trying to say is that is not a LSP-copilot's issue but a "general LSP" issue, right?

Correct. But I am not sure whether that's what you encountered.

jfcherng avatar Feb 02 '25 16:02 jfcherng