Git Product home page Git Product logo

Comments (8)

sbdchd avatar sbdchd commented on July 28, 2024

Currently Neoformat does't interact with formatprg, but I think it is doable.

Maybe something along the lines of:

let g:neoformat_try_formatprg = 1

Which would cause neoformat to try and use the formatprg defined for the filetype, before going through the other formatter definitions defined in neoformat.

Is that along the lines of what you were thinking?

from neoformat.

fortes avatar fortes commented on July 28, 2024

Yes, I think that sounds reasonable. Neomake allows you to specify makeprg as the maker as well, could do something similar where formatprg is a valid enabled maker.

from neoformat.

sbdchd avatar sbdchd commented on July 28, 2024

If you let g:neoformat_try_formatprg = 1, then Neoformat should now try the formatprg in the latest version.

from neoformat.

fortes avatar fortes commented on July 28, 2024

Thanks for this change! However, it doesn't seem to pick up the arguments to formatprg. When I run neoformat verbose, here's what it outputs:

Neoformat: prettier --stdin

But here is formatprg:

:set formatprg?  
formatprg=prettier --stdin --flow-parser --single-quote --bracket-spacing false

from neoformat.

sbdchd avatar sbdchd commented on July 28, 2024

I think I fixed it in the dev branch, if you want to give it a spin.

Before, Neoformat was using its own formatter definitions before trying the one supplied by formatprg.

from neoformat.

fortes avatar fortes commented on July 28, 2024

Just pulled dev and it works now, thanks. Looking forward to having this in master

from neoformat.

sbdchd avatar sbdchd commented on July 28, 2024

Added to master.

from neoformat.

fortes avatar fortes commented on July 28, 2024

Thanks! This makes my config much nicer: fortes/dotfiles@f6162c7

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.