Files
w0rp 9a5514b9aa Close #24 - Add context-aware prompting
Add initial context-aware prompt editing by writing simple scripts.
2023-03-17 00:37:28 +00:00

11 lines
364 B
VimL

" Author: w0rp <[email protected]>
" Description: Pre-processing rules for Go files.
function! neural#pre_process#go#Process(buffer, input) abort
let l:has_package = search('^package ', 'wnc') != 0
let a:input.prompt = 'Write golang code. '
\ . (l:has_package ? 'Do not write package main or main func. ' : '')
\ . a:input.prompt
endfunction