Skip to content

Commit

Permalink
firenvim#install(): catch cases where Firenvim isn't in runtimepath
Browse files Browse the repository at this point in the history
This commit catches the case where firenvim#run isn't defined and
provides the user with a warning message. We also output the RTP on
stderr for good measure.
This would have helped with debugging #1432.
  • Loading branch information
glacambre committed Oct 19, 2022
1 parent d8220a1 commit 21dd0c7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion autoload/firenvim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,16 @@ function! s:get_executable_content(data_dir, prolog) abort
\ s:capture_env_var('XDG_CACHE_HOME') .
\ s:capture_env_var('XDG_RUNTIME_DIR') .
\ a:prolog . "\n" .
\ "exec '" . s:get_progpath() . "' --headless " . l:stdioopen . " --cmd 'let g:started_by_firenvim = v:true' -c 'call firenvim#run()'\n"
\ "exec '" . s:get_progpath() .
\ "' --headless " . l:stdioopen .
\ " --cmd 'let g:started_by_firenvim = v:true' " .
\ "-c 'try|" .
\ 'call firenvim#run()|' .
\ 'catch|' .
\ "call chansend(g:firenvim_c,[\"f\\n\\n\\n\"..json_encode({\"messages\":[\"Your plugin manager did not load the Firenvim plugin for neovim.\"]+g:firenvim_o,\"version\":\"0.0.0\"})])|" .
\ "call chansend(2,[\"Firenvim not in rtp:\"..&rtp])|" .
\ 'qall!' .
\ "|endtry'\n"
endfunction

function! s:get_manifest_beginning(execute_nvim_path) abort
Expand Down

0 comments on commit 21dd0c7

Please sign in to comment.