Files
dotfiles/dot_config/nvim/lua/plugins/ai.lua
s0wlz (Matthias Puchstein) ca2b441bb7 nvim,tmux,kitty: full config overhaul (AstroNvim → native 0.12)
Replaces AstroNvim v5 with from-scratch Neovim 0.12 config using
vim.lsp.config()/vim.lsp.enable() natively, lazy.nvim, blink.cmp,
and smart-splits tmux integration.

tmux: new C-Space prefix, hjkl pane nav, resize key table, tpm plugins.
kitty: add allow_remote_control for smart-splits.
2026-04-09 23:30:34 +02:00

35 lines
912 B
Lua

return {
-- Local AI ghost text via ollama (FIM completion)
{
"huggingface/llm.nvim",
event = "InsertEnter",
keys = {
{ "<leader>ta", "<cmd>LLMToggleAutoSuggest<cr>", desc = "Toggle AI suggestions" },
},
opts = {
backend = "ollama",
model = "qwen2.5-coder:latest",
url = vim.env.OLLAMA_HOST or "http://localhost:11434",
tokens_to_clear = { "<|endoftext|>" },
fim = {
enabled = true,
prefix = "<|fim_prefix|>",
middle = "<|fim_middle|>",
suffix = "<|fim_suffix|>",
},
context_window = 4096,
tokenizer = nil, -- use token estimation
enable_suggestions_on_startup = true,
display = {
renderer = "virtual-text",
virtual_text = {
enabled = true,
hl = "Comment",
},
},
accept_keymap = "<Tab>",
dismiss_keymap = "<C-]>",
},
},
}