Closed andrejohansson closed 2 weeks ago
Hello,
I have installed lsp-ai
❯ (Get-Command lsp-ai).Path C:\Users\AndreJohansson\.cargo\bin\lsp-ai.exe
I have set my openai key
❯ $env:OPENAI_API_KEY sk-proj-...
I have used your example to configure my languages file. I added rust to it.
languages.toml
... ################################# ## Configuration for languages ## ################################# [[language]] name = "python" language-servers = ["pyright", "lsp-ai"] [[language]] name = "rust" auto-format = true language-servers = ["rust-analyzer", "lsp-ai"]
Then I upen a rust file in helix
hx main.rs
How would I then trigger prompts and questions etc? Please note: I'm a novice helix user, so any keyboard shortcuts and commands are helpful.
Completions are triggered when typing in Helix. They pop up in the same window that completions from the rust-analyzer show up in. There are some configuration options available. See the completion-*
keys: https://docs.helix-editor.com/configuration.html
For a good test to make sure your completions are working you should be able to type something like:
fn multiply_two_numbers
If you pause for a second with your cursor directly after the s
in Insert mode, you should get a completion that pops up.
When helix does get plugins support we are planning to write our own Helix plugin that will offer inline completion like our VS Code plugin.
If LSP-AI completions are not displaying for you, please follow the Debug section of the wiki and share the output of the helix log file.
Thanks for checking LSP-AI out!
It worked, thank you!
Hello,
I have installed lsp-ai
I have set my openai key
I have used your example to configure my languages file. I added rust to it.
languages.toml
Then I upen a rust file in helix
How would I then trigger prompts and questions etc? Please note: I'm a novice helix user, so any keyboard shortcuts and commands are helpful.