Git Product home page Git Product logo

Comments (3)

sbdchd avatar sbdchd commented on July 28, 2024

v:shell_error just returns the exit code of the last command, which I don't think is very necessary for the user to see. It can be useful for debugging which is why I use log.

The following diff prints:

Neoformat: 126
Neoformat: attempted all formatters for current filetype
Press ENTER or type command to continue

vs the normal

Neoformat: attempted all formatters for current filetype
diff --git a/autoload/neoformat.vim b/autoload/neoformat.vim
index 7157f97..1643433 100644
--- a/autoload/neoformat.vim
+++ b/autoload/neoformat.vim
@@ -111,7 +111,7 @@ function! s:neoformat(bang, user_input, start_line, end_line) abort
                 return neoformat#utils#msg('no change necessary with ' . cmd.name)
             endif
         else
-            call neoformat#utils#log(v:shell_error)
+            call neoformat#utils#msg(v:shell_error)
             call neoformat#utils#log('trying next formatter')
         endif
     endfor
diff --git a/autoload/neoformat/formatters/python.vim b/autoload/neoformat/formatters/python.vim
index 97958e4..0829705 100644
--- a/autoload/neoformat/formatters/python.vim
+++ b/autoload/neoformat/formatters/python.vim
@@ -4,7 +4,7 @@ endfunction
 
 function! neoformat#formatters#python#yapf() abort
     return {
-                \ 'exe': 'yapf',
+                \ 'exe': 'apf',
                 \ 'stdin': 1
                 \ }
 endfunction

from neoformat.

nhooyr avatar nhooyr commented on July 28, 2024

It should also print the name of the formatter that errored.

from neoformat.

sbdchd avatar sbdchd commented on July 28, 2024

I think :Neoformat should remain quiet most of the time and only msg when necessary e.g. no formatters worked, or formatter worked.

from neoformat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.