From d7b0ef21e4bc0b7923f136829a679f78bdeb3243 Mon Sep 17 00:00:00 2001 From: probalazs Date: Sat, 18 Apr 2026 19:18:02 +0200 Subject: [PATCH] Add LlamaToggle command, hide completion info, and update README - Add :LlamaToggle to enable/disable llama.vim completions without stopping server - Disable inline timing/info display in llama.vim (show_info = 0) - Add llama.cpp installation instructions to README Co-Authored-By: Claude Sonnet 4.6 --- README.md | 5 +++++ init.lua | 4 ++++ lua/custom/plugins/init.lua | 1 + 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 093e42a6..24a70f5b 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,11 @@ External Requirements: - If you want to write Typescript, you need `npm` - If you want to write Golang, you will need `go` - etc. +- [llama.cpp](https://github.com/ggml-org/llama.cpp) (optional, for local AI code completion via llama.vim) + - macOS: `brew install llama.cpp` + - Other platforms: see [llama.cpp installation](https://github.com/ggml-org/llama.cpp#installation) + - Start the server with: `:LlamaStart` inside Neovim (uses `qwen2.5` FIM model by default) + - Stop the server with: `:LlamaStop` (also stops automatically when Neovim exits) > [!NOTE] > See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes diff --git a/init.lua b/init.lua index 0e69b7dd..74ec4b84 100644 --- a/init.lua +++ b/init.lua @@ -225,6 +225,10 @@ vim.keymap.set('n', 'sh', 'sp', { desc = '[S]plit [H]orizontal' local llama_job_id = nil +vim.api.nvim_create_user_command('LlamaToggle', function() + vim.cmd 'call llama#toggle()' +end, { desc = 'Toggle llama.vim completion' }) + vim.api.nvim_create_user_command('LlamaStart', function() if llama_job_id then vim.notify('llama-server is already running', vim.log.levels.WARN) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 00beadee..a3296aae 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -21,6 +21,7 @@ return { ring_n_chunks = 64, -- more project context chunks ring_chunk_size = 64, -- smaller chunks for speed ring_scope = 2048, -- wider scope around cursor + show_info = 0, -- disable inline timing/info display } end, },