Here is how I locally run code completion, a chat and a coding agent!
I am using Linux as operating system and neovim as editor. My code agent is openhands. In neovim, I rely on lazy.nvim for managing plugins, and for this particular application, I use llama.vim for code completion and codecompanion as chat.