Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File truncation after vim-prettier reformating when foldmethod=syntax #20

Open
esanzgar opened this issue Dec 10, 2019 · 0 comments
Open

Comments

@esanzgar
Copy link

esanzgar commented Dec 10, 2019

I have three plugins installed using Vundle.

This is my .vimrc:

set nocompatible
filetype off
set shell=/bin/bash

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'gmarik/Vundle.vim'

Plugin 'leafgarland/typescript-vim'        " syntax, indenting and compiler for ts
Plugin 'peitalin/vim-jsx-typescript'       " syntax highlight for TSX files
Plugin 'prettier/vim-prettier'             " alternative to jsbeautify

call vundle#end()


filetype plugin indent on


" Make vim recognize syntax
syntax on
set foldmethod=syntax

noremap <C-f> :Prettier<CR>

When I format a .tsx file with vim-prettier the file gets truncated. This only happens if set foldmethod=syntax.

This is caused by a weird interaction between the three plugins.

Do you have any hints for me?

truncated_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant