imxiejie / ThinkVim

Vim configuration in the 21st century
MIT License
868 stars 106 forks source link

Prettier is not working #83

Closed gj1118 closed 4 years ago

gj1118 commented 4 years ago

Problems summary

I am working on React project and I am trying to install Prettier. This is what I have already done. I created a .thinkvim.d in my users folder and under that folder I created local_plugins.yaml. In that file I added the following section

 - repo: prettier/prettier
    on_map: { n: <Plug> }

but I cannot access :Prettier

Environment Information

NVIM v0.4.3 Build type: Release LuaJIT 2.0.5 Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEV EL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimpli cit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPAC K_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/config -I/tmp/neovim-20191107-13403- 1or2rj3/neovim-0.4.3/src -I/usr/local/include -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/deps-build/include -I/usr/local/opt/ gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I /tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/src/nvim/auto -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/include Compiled by brew@Mojave.local

Features: +acl +iconv +tui See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.3/share/nvim"

gj1118 commented 4 years ago

Also, I am not sure why this is happening.. Notice that on line 149 , componentWillUnmount method moves to the right, whenever I press Enter key at the end of that line . https://share.getcloudapp.com/8LuwGzbd .. Can you please let me know why that would be happening ?

Thanks

glepnir commented 4 years ago

HI @gj1118 you dont need install pretter.because the thinkvim support it by coc-prettier.

gj1118 commented 4 years ago

Thanks.. It worked..Much appreciated. one more thing please , can you please let me know why there is a code indent happening on line 149 . Please see this video demo of the issue - https://share.getcloudapp.com/8LuwGzbd

Thanks

glepnir commented 4 years ago

I need to know what filetype is. maybe the indent setting of filetype is wrong? so please provide more information ,its very useful to debug error. Thanks for your report!

gj1118 commented 4 years ago

it is a JS file in a react project.

glepnir commented 4 years ago

Reproduce.i will fix it later

glepnir commented 4 years ago

fixed