In your ~/.config/nvim/init.vim, have something like
function! TW_done(channel) call rpcrequest( a:channel, 'tw_done' ) endfunction function! TW_show(...) if a:0 call rpcrequest( g:nvimx_channel, 'tw_show', a:1 ) else let filter = input( "filter: ", " " ) call rpcrequest( g:nvimx_channel, 'tw_show', filter ) endif endfunction function! TW_toggle_focus(channel) call rpcrequest( a:channel, 'tw_toggle_focus' ) endfunction function! TW_mod(channel) call rpcrequest( a:channel, 'tw_mod' ) endfunction au FileType task map <leader>d :call TW_done(nvimx_channel)<CR> au FileType task map <leader>ll :call TW_show('+PENDING -WAITING -BLOCKED')<CR> au FileType task map <leader>lq :call TW_show()<CR> au FileType task map <leader>m :call TW_mod(nvimx_channel)<CR> au FileType task map <leader>f :call TW_toggle_focus(nvimx_channel)<CR> au FileType task map <buffer> <leader>ph :call TW_mod(nvimx_channel)<CR> au FileType task set nowrap " requires the plugin dhruvasagar/vim-table-mode au FileType task TableModeEnable
then set the env variable NVIM_LISTEN_ADDRESS to, say, 127.0.0.1:6543 and start nvim in one shell, and this script in another, and enjoy your new nvim-powered taskwarrior UI!
127.0.0.1:6543
To install Neovim::RPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Neovim::RPC
CPAN shell
perl -MCPAN -e shell install Neovim::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.