dargor / codeassistant.vim

A Vim plugin for a code assistant with local LLMs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeAssistant.vim

A vim plugin for code completion with local LLMs.

Comment mode: asciicast

Autocomplete mode: asciicast

Usage

AutoCompletion mode

To perform autocompletion, select the lines that you want to complete (in visual mode) and call :'<,'>AutoComplete

Comment mode

To comment a piece of code, select the lines (in visual mode) and call :'<,'>Comment

Requirements

Requires ollama and vim with python3 support. The default model is deepseek-coder:6.7b-instruct, you can change it by editing python3/codeassistant.py, by changing the MODEL_NAME variable.

Install with vim-plug

Plug 'leocus/codeassistant.vim'

Disclaimer

This plugin uses pretrained LLMs to generate code. Beware of the limitations of LLMs and of possible bugs in the plugin (which are quite likely :) ). If you have any suggestion for improving this plugin or to report any bug, please open an issue! :)

About

A Vim plugin for a code assistant with local LLMs

License:Apache License 2.0


Languages

Language:Python 87.4%Language:Vim Script 12.6%