-
Notifications
You must be signed in to change notification settings - Fork 45
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
I can't get a full suggestion #96
Comments
Hum... I see this is dup of #87, though I have the latest plugins, that is still a problem. |
Is this occurring globally or only with specific filetypes/languages? Also, have you tried using just copilot.lua and not copilot-cmp on the files where this issue is present? If the same issue persists with just copilot.lua, it is almost certainly an issue with copilot itself. |
I also observe this behavior. I only get one-liner suggestions. See my config here https://github.com/crzdg/dotfiles |
That is globally, @zbirenbaum. I haven't tried using copilot without cmp. I will try that and get back to you. Thank you for your superfast response and follow questions, @zbirenbaum 🙇🏻 |
@zbirenbaum sorry for the late response. I am actually using lunarvim, and I setup my plugins like so: lvim.builtin.cmp.active = false
-- plugins
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
suggestion = {
enabled = true,
auto_trigger = true,
debounce = 75,
keymap = {
accept = "<c-l>",
accept_word = false,
accept_line = false,
next = "<M-]>",
prev = "<M-[>",
dismiss = "<C-]>",
},
},
})
end,
},
-- {
-- "zbirenbaum/copilot-cmp",
-- config = function ()
-- require("copilot_cmp").setup()
-- end
-- }, I get multiple-line suggestions, so I believe that is actually a copilot-cmp issue. |
I'm also unable to get multi-line suggestions with copilot-cmp. Would be curious if anyone has found a fix yet. |
Same thing happening to me on latest version of both plugins, but only with TS/JS |
Same here, I've noticed this long thread here with a potential solution for vscode https://github.com/orgs/community/discussions/40522#discussioncomment-6350781 |
I'm observing a quite bizarre behaviour. Not sure what's the origin. Right now I'm checking with Ruby. If I take an existing class with any method and type class Foo
# here wouldn't work
def bar
# here wouldn't work
puts "hi"
# here it works
end
# here it works
end If I create a new file, set the syntax to Ruby and start typing, I get multi-line suggestions all the time, wherever I try to write the method. However, if I save this file as |
Hum, that is good input, @dgmora I opened a new buffer did This was the first suggestion, which I accepted: # fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end
# Path: tmp/copilot.rb
# fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end
# Path: tmp/copilot.rb
# fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end
# Path: tmp/copilot.rb
# fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end
# Path: tmp/copilot.rb
# fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end
# Path: tmp/copilot.rb
# fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end
# Path: tmp/copilot.rb
# fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end
# Path: tmp/copilot.rb
# fibonacci method
class Fibonacci
def self.fib(n)
return 0 if n == 0
return 1 if n == 1
fib(n - 1) + fib(n - 2)
end
end I tried again, and then: # fibonacci method
class Fibonacci
def self.fibonacci(n)
return 0 if n == 0
return 1 if n == 1
fibonacci(n - 1) + fibonacci(n - 2)
end
end
# then I tried def fib...
def fibonacci(n)
Fibonacci.fibonacci(n)
end I saved and it kept working... def sqrt(n)
Math.sqrt(n)
end
def camelize(string)
string.split('_').map(&:capitalize).join
end I closed nvim, reopened it, and now it works for that file 🤷🏻 Then I closed vim, opened an existing file in the project, and now it is back to one-liners. Then I tried your workaround, adding an "end", without a def. I typed |
This got fixed for me as soon as I updated to new version of copilot-cmp as suggested here |
Hey there @zbirenbaum , thank you for this awesome plugin! 🙇🏻
I have this issue. My suggestions are all one-liners.
Instead of having this:
I get just the first line of the suggestion:
Once I accept the suggestion, and start editing the next line, it offers the second line, and so on.
Could this be a miss-configuration?
This is what I had
And this is what I have now, but the behavior is the same:
Thank you in advance
The text was updated successfully, but these errors were encountered: