Skip to content

Commit

Permalink
Capture and re-export $NVIM_APPNAME when it's defined
Browse files Browse the repository at this point in the history
  • Loading branch information
glacambre committed Feb 17, 2023
1 parent 2ff7e2d commit 07652ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Temporarily disabling (and re-enabling) Firenvim in a tab can be done either by

### Building a Firenvim-specific config

**New**: With Neovim nightly builds from 2023/02/17 or more recent, you can use [$NVIM_APPNAME](https://neovim.io/doc/user/starting.html#$NVIM_APPNAME) to define a completely separate firenvim config. In order to do that, make sure "NVIM_APPNAME" is appropriately set when you run firenvim#install().

When it starts Neovim, Firenvim sets the variable `g:started_by_firenvim` which you can check to run different code in your init.vim. For example:

```vim
Expand Down
1 change: 1 addition & 0 deletions autoload/firenvim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ function! s:get_executable_content(data_dir, prolog) abort
\ s:capture_env_var('XDG_CONFIG_DIRS') .
\ s:capture_env_var('XDG_CACHE_HOME') .
\ s:capture_env_var('XDG_RUNTIME_DIR') .
\ s:capture_env_var('NVIM_APPNAME') .
\ a:prolog . "\n" .
\ "exec '" . s:get_progpath() .
\ "' --headless " . l:stdioopen .
Expand Down

0 comments on commit 07652ec

Please sign in to comment.