Skip to content

Comments

Output console messages directly with :Vader! - improve Neovim support#175

Merged
blueyed merged 9 commits intojunegunn:masterfrom
blueyed:echo
Nov 21, 2018
Merged

Output console messages directly with :Vader! - improve Neovim support#175
blueyed merged 9 commits intojunegunn:masterfrom
blueyed:echo

Conversation

@blueyed
Copy link
Collaborator

@blueyed blueyed commented Aug 10, 2018

This skips the console buffer for :Vader!, but echos messages directly to stderr.

Writing to stderr is improved for Neovim (v0.3.0+), which should make this work on Windows by default.

My main motivation here was to make this work on Windows with Neovim, but then also noticed that it is really good to have the output as it comes already.

TODO:

  • doc

Includes #177.

endfunction
endif
endif

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinmk
Does this make sense? (came up with this via neovim/neovim#8846)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but I wouldn't bother supporting older nvim versions without v:stderr (and you only need to check exists('v:stderr').

@codecov-io
Copy link

codecov-io commented Aug 10, 2018

Codecov Report

Merging #175 into master will decrease coverage by 0.48%.
The diff coverage is 82.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
- Coverage   86.99%   86.51%   -0.49%     
==========================================
  Files          12       12              
  Lines         746      771      +25     
==========================================
+ Hits          649      667      +18     
- Misses         97      104       +7
Flag Coverage Δ
#nvim 84.04% <48.88%> (-1.75%) ⬇️
#vim 85.08% <71.11%> (-1.25%) ⬇️
Impacted Files Coverage Δ
autoload/vader/window.vim 69.34% <100%> (+0.68%) ⬆️
autoload/vader.vim 89.01% <80.48%> (-1.97%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bf55fc...3928ae6. Read the comment docs.

@blueyed blueyed changed the title Add support for $VADER_ECHO_MESSAGES to output console entries directly Output console messages directly with :Vader! - improve Neovim support Aug 12, 2018
@blueyed blueyed force-pushed the echo branch 5 times, most recently from cfe6fe5 to 78a9065 Compare August 12, 2018 16:51
@blueyed blueyed requested a review from junegunn August 12, 2018 16:54
blueyed added a commit to neomake/neomake that referenced this pull request Aug 13, 2018
Also skips logging output from NVIM_LOG_FILE, :echom etc.  This is
needed with junegunn/vader.vim#175, where those
will come after "Starting Vader" now.

[ci skip]
okhin pushed a commit to okhin/neomake that referenced this pull request Sep 11, 2018
Also skips logging output from NVIM_LOG_FILE, :echom etc.  This is
needed with junegunn/vader.vim#175, where those
will come after "Starting Vader" now.

[ci skip]
This will write console output directly, instead of buffering it.
This is relevant with $VADER_ECHO_MESSAGES, and not using
$VADER_OUTPUT_FILE.
- VADER_ECHO_MESSAGES can be stderr/stdout (defaults to stderr, if
  non-empty)
- Detects if `nvim --headless` is used, where `:echon` can be used
No need to have VADER_ECHO_MESSAGES, but just skip s:console_buffer with
`:Vader!` in general.  Also improves `vader#print_stderr` to support
Neovim directly (without VADER_OUTPUT_FILE).
@blueyed blueyed merged commit 5fa52a8 into junegunn:master Nov 21, 2018
@blueyed blueyed deleted the echo branch November 21, 2018 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants