Skip to content

Commit

Permalink
TROUBLESHOOTING.md: update print-debugging instructions
Browse files Browse the repository at this point in the history
Situation was becoming untenable, the `exec nvim` line is now 600
characters long.
  • Loading branch information
glacambre committed Nov 1, 2022
1 parent b8f8645 commit e7f678c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,4 @@ Note that this sets your `$PATH` in stone and that in order to update it you'll

You can't use `echo` or `echom` in your init.vim before Firenvim has been loaded and initialized. If you need to debug your init.vim, you could try one of these two apparoaches:
- Append the messages you would normally `echom` to a list which you will only display after the `UiEnter` autocommand has been triggered.
- Use `echoerr` instead and redirect Neovim's stderr to a file on your disk in the [firenvim script](#make-sure-the-firenvim-script-has-been-created) like this:

```diff
-exec '/usr/bin/nvim' --headless --cmd "let g:firenvim_i=[]|let g:firenvim_o=[]|let g:Firenvim_oi={i,d,e->add(g:firenvim_i,d)}|let g:Firenvim_oo={t->add(g:firenvim_o,t)}|let g:firenvim_c=stdioopen({'on_stdin':{i,d,e->g:Firenvim_oi(i,d,e)},'on_print':{t->g:Firenvim_oo(t)}})" --cmd 'let g:started_by_firenvim = v:true' -c 'call firenvim#run()'
+exec '/usr/bin/nvim' --headless --cmd "let g:firenvim_i=[]|let g:firenvim_o=[]|let g:Firenvim_oi={i,d,e->add(g:firenvim_i,d)}|let g:Firenvim_oo={t->add(g:firenvim_o,t)}|let g:firenvim_c=stdioopen({'on_stdin':{i,d,e->g:Firenvim_oi(i,d,e)},'on_print':{t->g:Firenvim_oo(t)}})" --cmd 'let g:started_by_firenvim = v:true' -c 'call firenvim#run()' 2>>/tmp/stderr | tee -a /tmp/stdout
```
- Use `echoerr` instead and redirect Neovim's stderr to a file on your disk in the [firenvim script](#make-sure-the-firenvim-script-has-been-created) by appending `2>>/tmp/stderr | tee -a /tmp/stdout` at the end of the `exec` line.

0 comments on commit e7f678c

Please sign in to comment.