Skip to content

Commit aebe34f

Browse files
committed
llama.vim : add comments [no ci]
1 parent 70148a8 commit aebe34f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/llama.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ highlight llama_hl_info guifg=#77ff2f
6262
"
6363
" ring_n_chunks: max number of chunks to pass as extra context to the server (0 to disable)
6464
" ring_chunk_size: max size of the chunks (in number of lines)
65-
" ring_scope: the range around the cursor position (in number of lines) for gathering chunks
65+
" note: adjust these numbers so that you don't overrun your context
66+
" at ring_n_chunks = 64 and ring_chunk_size = 64 you need ~32k context
67+
" ring_scope: the range around the cursor position (in number of lines) for gathering chunks after FIM
6668
" ring_update_ms: how often to process queued chunks in normal mode
6769
"
6870
let s:default_config = {
@@ -416,7 +418,10 @@ function! llama#fim(is_auto, on_hold) abort
416418
" only gather chunks if the cursor has moved a lot
417419
" TODO: something more clever? reranking?
418420
if a:is_auto && l:delta_y > 32
421+
" expand the prefix even further
419422
call s:pick_chunk(getline(max([1, s:pos_y - g:llama_config.ring_scope]), max([1, s:pos_y - g:llama_config.n_prefix])), v:false, v:false)
423+
424+
" pick a suffix chunk
420425
call s:pick_chunk(getline(min([l:max_y, s:pos_y + g:llama_config.n_suffix]), min([l:max_y, s:pos_y + g:llama_config.n_suffix + g:llama_config.ring_chunk_size])), v:false, v:false)
421426

422427
let s:pos_y_pick = s:pos_y

0 commit comments

Comments
 (0)