neoformat icon indicating copy to clipboard operation
neoformat copied to clipboard

"Neoformat: No changes necessary"

Open ballenwillis opened this issue 5 years ago • 10 comments

In my vim config file I simple have Plug 'sbdchd/neoformat'

On a JS file in react native, when I try to run :Neoformat it gives me the message "Neoformat: No changes necessary". I've confirmed I save the file before running this.

According to my linter (and just by looking at it) some lines do not meet the prettier config, so I'm not sure why neoformat is saying my file is good.

image

ballenwillis avatar Dec 14 '19 02:12 ballenwillis

I have the same Problem in SPACEVIM, in OSX

sbrocos avatar Jul 22 '20 07:07 sbrocos

@sbrocos Me too!

ccqstark avatar Jan 30 '21 10:01 ccqstark

I have the same issue

Johan-Palacios avatar Jun 15 '21 19:06 Johan-Palacios

The same issue with c files while python formatters work just fine.

markdestouches avatar Jun 28 '21 19:06 markdestouches

Bros I can solve this problems when i installed the native language servers in my PC and neoformat works well

Johan-Palacios avatar Jun 28 '21 19:06 Johan-Palacios

I have this too :/

olivewong avatar Jul 07 '21 18:07 olivewong

FYI I seem to receive this message when the formatting program exits with an error. In particular I saw it happening when I introduced a syntax error into my code, which meant the formatter cannot parse the code and returns with an error.

sheldond avatar Sep 22 '21 01:09 sheldond

I fixed by using :Neoformat :prettier instead of :Neoformat and double check prettier is installed npm install -g prettier

olivewong avatar Apr 04 '22 18:04 olivewong

@olivewong, there should be no need to install prettier globally if it is installd in local project since setting let g:neoformat_try_node_exe = 1. Yet in my case, prettier is installed locally but still not available in to execute :/

alk-mandrianarijaona avatar Apr 05 '22 13:04 alk-mandrianarijaona

@olivewong no need for :prettier in :Neoformat :prettier if you let g:neoformat_try_node_exe=1 in your init.vim file. but yes, you need to install prettier either globally or locally. you can also use autocmd BufWritePre *.js Neoformat in your init.vim to format your code on write (save) w/o having to do :Neoformat every time.

ghost avatar Dec 24 '22 19:12 ghost