Skip to content

Commit

Permalink
Add a Lua file
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rp committed Nov 19, 2023
1 parent a4f742a commit 9f37d8c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autoload/neural/pre_process/lua.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
" Author: w0rp <[email protected]>
" Description: Pre-processing rules for Lua files.

function! neural#pre_process#lua#Process(buffer, input) abort
let a:input.prompt = 'Write Lua code. '
\ . a:input.prompt
endfunction
12 changes: 12 additions & 0 deletions test/vim/pre_process/test_lua.vader
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Before:
let g:input = {'prompt': 'Do something.'}
call neural#config#Load()

After:
unlet! g:input

Given lua(An empty Lua file):
Execute(Basic Lua prompt editing should be done):
call neural#PreProcess(bufnr(''), g:input)

AssertEqual 'Write Lua code. Do something.', g:input.prompt

0 comments on commit 9f37d8c

Please sign in to comment.