dustinblackman / oatmeal

Terminal UI to chat with large language models (LLM) using different model backends, and integrations with your favourite editors!
https://dustinblackman.com/posts/oatmeal/
MIT License
487 stars 23 forks source link

Add more documentation on how to get sidecar approach working for neovim #13

Closed StevenBucher98 closed 8 months ago

StevenBucher98 commented 9 months ago

Hi! Love this project and been playing around with the basic prompting experience and been having trouble recreating the GIF from this blog post where I found this project https://dustinblackman.com/posts/oatmeal/

Any tips on how to get this working? I tried oatmeal --editor neovim but get error that neovim is not running.

dustinblackman commented 9 months ago

Thanks for checking this out! :D

The neovim extension is doing all the heavy lifting for that. :) Once installed, you can follow the documentation on the readme for getting Neovim and Oatmeal to talk nicely. https://github.com/dustinblackman/oatmeal.nvim

dustinblackman commented 9 months ago

@StevenBucher98 Did the extension work for you?

StevenBucher98 commented 9 months ago

It did eventually, it took me a while cause I am unfamiliar with lazy vim 😄 I created these rough implementation instructions:

a. install oatmeal: https://github.com/dustinblackman/oatmeal brew install dustinblackman/tap/oatmeal

b. Install ollama2: brew install dustinblackman/tap/oatmeal https://ollama.ai/download/Ollama-darwin.zip

c. install neovim https://github.com/neovim/neovim

d. Install lazy.vim https://github.com/folke/lazy.nvim https://www.lazyvim.org/installation

e. In .config/nvim/lua/plugins create a new file named 'oatmeal.lua"

f. Add this code: return { { "dustinblackman/oatmeal.nvim", cmd = { "Oatmeal" }, keys = { { "om", mode = "n", desc = "Start Oatmeal session" }, }, opts = { backend = "ollama", model = "llama2:latest", }, }, }

dustinblackman commented 9 months ago

Nice good stuff! What were you previously using as a plugin manager? Lazy.nvim is not a requirement, just an option to install it.

StevenBucher98 commented 9 months ago

I've been using brew as package manager, Lazy.nvim is not? It seemed like a requirement for the side car/side by side experience with nvim

dustinblackman commented 8 months ago

Sorry I meant plugin manager. Lazy.nvim is just one way to manage plugins in Neovim.

StevenBucher98 commented 8 months ago

I used lazy vim for the plugin management, I manually input all the lua files to get it working

dustinblackman commented 8 months ago

Ah! Understood, you were doing it by hand.

I'm glad you got everything working! I don't feel like Oatmeal should be documenting how to do a full setup of Neovim+Ollama, as this is just the UI. I'll leave it to each repositories documentation for setup.