Open bajrangCoder opened 2 weeks ago
After few tries , lsp-ai starts working but completions are not shown, in server logs (rpc) I get like this(after a long delay)
.....
// Receive:
{"jsonrpc":"2.0","id":11,"result":{"isIncomplete":false,"items":[{"filterText":"def a","kind":1,"label":"ai - b: int ->int(x,y)\n\nreturn x + y\n\n\nfunction c <| fim begin ||> d |<|{print(\"Hello World","textEdit":{"newText":"b: int ->int(x,y)\n\nreturn x + y\n\n\nfunction c <| fim begin ||> d |<|{print(\"Hello World","range":{"end":{"character":5,"line":1},"start":{"character":5,"line":1}}}}]}}
// Receive:
{"jsonrpc":"2.0","id":13,"result":{"isIncomplete":false,"items":[{"filterText":"def add","kind":1,"label":"ai - (a: int, b :int) -> | fim begin | >result < |end match result do if true then return(add_(1","textEdit":{"newText":" (a: int, b :int) -> | fim begin | >result < |end match result do if true then return(add_(1","range":{"end":{"character":7,"line":1},"start":{"character":7,"line":1}}}}]}}
Seems its working and I guess its editor problem
Thanks for creating an issue! I haven't tested it in Zed yet. Can you share your configuration for Zed so I can try to recreate it and fix these bugs?
Thanks for creating an issue! I haven't tested it in Zed yet. Can you share your configuration for Zed so I can try to recreate it and fix these bugs?
Here is extension source: https://github.com/bajrangCoder/zed-lsp-ai
We can't configure any unknown lsp directly, it should be added through extension in zed. But we can configure lsp options from settings
Got it, thank you! I will look at this tonight.
I spent some time playing around with this. As you saw, I did see the completion requests being fulfilled by LSP-AI, but Zed doesn't always show them. I think this might be a bug with Zed, I'm not sure. It would be really awesome to have a good integration with their editor. Maybe create an issue on their github? If you do, can you tag me in it, or send me the link, I would love to see what they say.
Also, how do you find codegemma's results? I was not able to get it to produce good outputs. I found llama3-8b with some decent prompting greatly outperforms it, but maybe I am prompting it incorrectly.
but Zed doesn't always show them
Does Zed show completions sometimes, as you mentioned, but not always ? 😳
I had already share this in their discord, btw I will create a issue for it on their GitHub.
Also, how do you find codegemma's results?.......
Currently, Ollama fails to install any model on my system. Previously, I had Codestral and Llama3, but when I tried to install a new model, I faced some issues. I thought it was a problem with my system, so I reinstalled Ollama. Now, I have lost all installed models.
Previously, I downloaded the Codegemma binary (.gguf) just for testing and added it locally to try out LSP AI. This is why I am compelled to use Codegemma.(Yep, it's not good for coding even its name suggests)
There may be a rather large quality loss when converting it to gguf. I was testing it outside of LSP-AI using Ollama's python library directly.
Thanks for creating the issue! Excited to see what the zed team says,
I am trying to use this in Zed using the LSP extension. I downloaded the lsp-ai using Cargo, bound it to different file types, and passed the following initialization options:
(Note: Codegemma is installed on my system using Ollama)
However, when I tested it, I didn't get any completions. Here are the LSP logs of lsp-ai:
Server Logs:
Server Logs (RPC):
Is this an issue with the editor, lsp-ai, or is it my fault?