Skip to content

Commit

Permalink
firenvim.vim: attempt to use nvim in $PATH if found
Browse files Browse the repository at this point in the history
According to https://repology.org/project/neovim/versions , most
supported distributions now ship a version of Neovim recent enough to
run Firenvim, so hopefully even outdated versions from distributions
should not cause us problems.

This change is still slightly risky because according to repology still,
Ubuntu 20.04 still ships neovim 0.4.3, which Firenvim might not work
with. According to https://ubuntu.com/about/release-cycle , Ubuntu 20.04
will stop being supported in April 2025, so let's take a gamble and
attempt to solve issues such as #1614.
  • Loading branch information
glacambre committed Jun 6, 2024
1 parent 9763162 commit e412ab2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autoload/firenvim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,13 @@ function! s:get_executable_content(data_dir, prolog) abort
\ s:capture_env_var('XDG_CACHE_HOME') .
\ s:capture_env_var('XDG_RUNTIME_DIR') .
\ s:capture_env_var('NVIM_APPNAME') .
\ "if command -v nvim >/dev/null 2>/dev/null; then\n" .
\ " FIRENVIM_NVIM_BINARY=nvim\n" .
\ "else\n" .
\ ' FIRENVIM_NVIM_BINARY=' . s:get_progpath() . "\n" .
\ "fi\n" .
\ a:prolog . "\n" .
\ "exec '" . s:get_progpath() .
\ "' --headless " . l:stdioopen .
\ 'exec "$FIRENVIM_NVIM_BINARY" --headless ' . l:stdioopen .
\ " --cmd 'let g:started_by_firenvim = v:true' " .
\ "-c 'try|" .
\ 'call firenvim#run()|' .
Expand Down

0 comments on commit e412ab2

Please sign in to comment.