Skip to content

Commit

Permalink
Add CSS prompt editing
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rp committed Oct 23, 2023
1 parent 9cecb73 commit 186fced
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload/neural/pre_process/css.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
" Author: w0rp <[email protected]>
" Description: Pre-processing rules for CSS files.

function! neural#pre_process#css#Process(buffer, input) abort
let a:input.prompt = 'Write CSS code. ' . a:input.prompt
endfunction
12 changes: 12 additions & 0 deletions test/vim/pre_process/test_css.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 css(An empty CSS file):
Execute(Basic CSS prompt editing should be done):
call neural#PreProcess(bufnr(''), g:input)

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

0 comments on commit 186fced

Please sign in to comment.