# HG changeset patch # User Luka Sitas # Date 1764337445 18000 # Node ID b95a8e2525cc5ce9e422cdfcf363878402b7fa19 # Parent 17c557de03e0b3f39a58bee9fe99b3171ce0c1f0 Better vim-ai support for local model on edit diff -r 17c557de03e0 -r b95a8e2525cc .vimrc --- a/.vimrc Tue Nov 18 11:37:01 2025 -0500 +++ b/.vimrc Fri Nov 28 08:44:05 2025 -0500 @@ -8,6 +8,7 @@ colorscheme desert " Support for tags closing and classes +source $HOME/.vim/plugins/vim-ai.vim source $HOME/.vim/plugins/taghelp source $HOME/.vim/plugins/dbtables/dbtables.vim source $HOME/.vim/plugins/hghelp/hghelp.vim @@ -104,10 +105,12 @@ " AI-ify Plug 'madox2/vim-ai' + + " LLama.vim " put before llama.vim loads -" let g:llama_config = { 'show_info': 0, 'endpoint': 'http://0.0.0.0:8080/infill' } -" Plug 'ggml-org/llama.vim' +let g:llama_config = { 'show_info': 0, 'endpoint': 'http://127.0.0.1:8012/infill' } +Plug 'ggml-org/llama.vim' call plug#end() diff -r 17c557de03e0 -r b95a8e2525cc plugins/vim-ai.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/vim-ai.vim Fri Nov 28 08:44:05 2025 -0500 @@ -0,0 +1,5 @@ +let g:vim_ai_roles_config_file = expand("$HOME/.vim/plugins/vim-ai/roles.ini") + +" debug settings +let g:vim_ai_debug = 1 +let g:vim_ai_debug_log_file = "/tmp/vim_ai_debug.log" diff -r 17c557de03e0 -r b95a8e2525cc plugins/vim-ai/roles.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/vim-ai/roles.ini Fri Nov 28 08:44:05 2025 -0500 @@ -0,0 +1,37 @@ +# .ini file structure: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure + + +# common options for all commands (complete, edit, chat) +[default] +options.model = gpt-5.1 + +[default.chat] +options.initial_prompt = + >>> system + You are a general assistant. + You are providing assistance through vim-ai chat. + If you attach code, please include ``` to enable syntax highlighting. + +[editor] +options.initial_prompt = + >>> system + You are a general assistant providing editin help through the vim-ai plugin. + Answer shortly, consisely and only what you are asked. + Do not provide any explanantion or comments if not requested. + If you answer in a code, do not wrap it in markdown code block. Do not include any markdown codeblocks. + +options.endpoint_url = http://127.0.0.1:8012/v1/chat/completions +options.auth_type = none + +[default.edit] +options.initial_prompt = + >>> system + You are a general assistant providing editin help through the vim-ai plugin. + Answer shortly, consisely and only what you are asked. + Do not provide any explanantion or comments if not requested. + If you answer in a code, do not wrap it in markdown code block. Do not include any markdown codeblocks. + Reasoning: low + +options.endpoint_url = http://127.0.0.1:8080/v1/chat/completions +options.reasoning_effort = none +options.auth_type = none diff -r 17c557de03e0 -r b95a8e2525cc test.vim