Git Product home page Git Product logo

Comments (10)

mitermayer avatar mitermayer commented on May 17, 2024 1

Hi @adam-beck,

Thanks for reporting this issue will look into it

from vim-prettier.

adam-beck avatar adam-beck commented on May 17, 2024

It does the same thing with .json files as well. The CLI works as expected.

vim-prettier version: 0.2.4
prettier version: 1.8.1

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov  6 2017 09:45:01)                                                                                                                                                 
Included patches: 1-1272                                                                                                                                                                                           
Compiled by adam@foobar                                                                                                                                                                                          
Huge version with GTK2 GUI.  Features included (+) or not (-):                                                                                                                                                     
+acl             +clipboard       +dialog_con_gui  +file_in_path    +job             +lua             +mouse_sgr       +path_extra      +rightleft       +tag_old_static  +toolbar         +windows                
+arabic          +cmdline_compl   +diff            +find_in_path    +jumplist        +menu            -mouse_sysmouse  +perl            +ruby            -tag_any_white   +user_commands   +writebackup            
+autocmd         +cmdline_hist    +digraphs        +float           +keymap          +mksession       +mouse_urxvt     +persistent_undo +scrollbind      -tcl             +vertsplit       +X11                    
+balloon_eval    +cmdline_info    +dnd             +folding         +lambda          +modify_fname    +mouse_xterm     +postscript      +signs           +termguicolors   +virtualedit     -xfontset               
+browse          +comments        -ebcdic          -footer          +langmap         +mouse           +multi_byte      +printer         +smartindent     +terminal        +visual          +xim                    
++builtin_terms  +conceal         +emacs_tags      +fork()          +libcall         +mouseshape      +multi_lang      +profile         +startuptime     +terminfo        +visualextra     +xpm                    
+byte_offset     +cryptv          +eval            +gettext         +linebreak       +mouse_dec       -mzscheme        -python          +statusline      +termresponse    +viminfo         +xsmp_interact          
+channel         +cscope          +ex_extra        -hangul_input    +lispindent      -mouse_gpm       +netbeans_intg   +python3         -sun_workshop    +textobjects     +vreplace        +xterm_clipboard        
+cindent         +cursorbind      +extra_search    +iconv           +listcmds        -mouse_jsbterm   +num64           +quickfix        +syntax          +timers          +wildignore      -xterm_save             
+clientserver    +cursorshape     +farsi           +insert_expand   +localmap        +mouse_netterm   +packages        +reltime         +tag_binary      +title           +wildmenu                                
   system vimrc file: "$VIM/vimrc"                                                                                                                                                                                 
     user vimrc file: "$HOME/.vimrc"                                                                                                                                                                               
 2nd user vimrc file: "~/.vim/vimrc"                                                                                                                                                                               
      user exrc file: "$HOME/.exrc"                                                                                                                                                                                
  system gvimrc file: "$VIM/gvimrc"                                                                                                                                                                                
    user gvimrc file: "$HOME/.gvimrc"                                                                                                                                                                              
2nd user gvimrc file: "~/.vim/gvimrc"                                                                                                                                                                              
       defaults file: "$VIMRUNTIME/defaults.vim"                                                                                                                                                                   
    system menu file: "$VIMRUNTIME/menu.vim"                                                                                                                                                                       
  fall-back for $VIM: "/usr/local/share/vim"                                                                                                                                                                       
 f-b for $VIMRUNTIME: "/usr/local/share/vim/vim80"                                                                                                                                                                 
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-
1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/inclu
de/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2   -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1                                                          
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0
 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -ldl  -L/us
r/lib -llua5.1 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.24/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.5/config -lpython3.5m  -lruby-2.3 -lpthread -lgm
p -ldl -lcrypt -lm

from vim-prettier.

mitermayer avatar mitermayer commented on May 17, 2024

Looks like something has changed on the new prettier 1.8 release. Will look into it and do a new release with the fixes as soon as possible

from vim-prettier.

mitermayer avatar mitermayer commented on May 17, 2024

Managed to reproduce this issue on prettier 1.8.1 will investigate a bit more on this tomorrow to try to solve it.

This seems to be only happening only on :PrettierAsync, so in the mean time people can be unblocked by using the synchronous formatting :Prettier

from vim-prettier.

mitermayer avatar mitermayer commented on May 17, 2024

So it turns out this was a regression introduced by #74


At this stage reverted that PR and will revisit it again to make sure no regressions will be introduced

from vim-prettier.

chemzqm avatar chemzqm commented on May 17, 2024

I'm ok with the revert, but I have no idea why the PR could cause this bug.

from vim-prettier.

vprasanth avatar vprasanth commented on May 17, 2024

If you're using nvm like me, and forget to set a node version in the terminal you launch vim from -- this can happen as well. Just heads up :)

from vim-prettier.

stiofand avatar stiofand commented on May 17, 2024

I've almost given up on coc-prettier because of this, there seems to be no solution for this. Such a shame

from vim-prettier.

mitermayer avatar mitermayer commented on May 17, 2024

@stevematdavies can you please open a new issue tracking this and Iā€™m happy to revisit it

from vim-prettier.

stiofand avatar stiofand commented on May 17, 2024

Thanks for the offer, but due to time constraints, I have chosen an alternative. However, once I have the time, I will certainly open a new issue.

from vim-prettier.

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.