Skip to content

Commit

Permalink
Manually load leafgarland/typescript-vim for typescriptreact files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmycuadra committed Aug 23, 2020
1 parent d4b2748 commit c2cbb6f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ autocmd FileType python set tabstop=4 softtabstop=4 shiftwidth=4

" File types
autocmd BufNewFile,BufReadPost *.md set filetype=markdown
autocmd BufNewFile,BufReadPost *.tsx runtime! indent/typescript.vim

" leafgarland/typescript-vim doesn't activate on the "typescriptreact"
" filetype. This augroup can be deleted if
" https://github.com/leafgarland/typescript-vim/pull/171
" is merged.
augroup tsx
autocmd!
autocmd BufRead,BufNewFile *.tsx runtime! compiler/typescript.vim
autocmd BufRead,BufNewFile *.tsx runtime! ftplugin/typescript.vim
autocmd BufRead,BufNewFile *.tsx runtime! indent/typescript.vim
autocmd BufRead,BufNewFile *.tsx runtime! syntax/typescript.vim
augroup END

" Line numbers
set number
Expand Down

0 comments on commit c2cbb6f

Please sign in to comment.