rhysd / reply.vim

REPLs play nicely with :terminal on Vim and Neovim
MIT License
186 stars 7 forks source link

Custom reply #3

Open rainerborene opened 5 years ago

rainerborene commented 5 years ago

It seems that reply.vim isn't considering this given configuration.

function! s:define_pgsql_repl() abort
  return reply#repl#base('psql', {
        \   'prompt_start': '\v^\w+\=# ',
        \   'prompt_continue': '\v^\w+\-# ',
        \ })
endfunction

let g:reply_repls = {
      \   'pgsql': [function('s:define_pgsql_repl')],
      \ }

Now I try to run this: :Repl pgsql -U app development

I got this instead. reply.vim: REPL 'pgsql' is not defined or not installed. Please check :ReplList

rainerborene commented 4 years ago

@rhysd any update?

rhysd commented 4 years ago

You gave 'psql' to reply#repl#base as REPL name. So :Repl psql is correct. As I described in README.md, keys of g:reply_repls are filetypes, not REPL names. So, with your setup, filetype needs to be set to pgsql in your buffer.

rainerborene commented 4 years ago

@rhysd everything is set up correctly like you said and still does not work. please, test and you'll see.