Browse Source

修复了编辑python代码的时候无法正确检查代码语法的问题,修复了TypeScript文件类型识别的问题

master
Kevin 1 year ago
parent
commit
cb91dabe4e
  1. 11
      configs/filetypes.vim
  2. 10
      configs/plugins.vim

11
configs/filetypes.vim

@ -50,3 +50,14 @@ function! JavaScriptFold()
setl foldtext=FoldText()
endfunction
" Typescript or Qt translation file (which is XML)
au BufNewFile,BufReadPost *.ts
\ if getline(1) =~ '<?xml' |
\ setf xml |
\ else |
\ setf typescript |
\ endif
" TypeScript with React
au BufNewFile,BufRead *.tsx setf typescriptreact

10
configs/plugins.vim

@ -53,3 +53,13 @@ let g:syntastic_check_on_wq = 0
let g:syntastic_python_checkers = ['autopep8']
" pymode in virtualenv require pylint support
python3 << EOF
import os
import sys
from pip._internal.cli.main import main as pip_main
if 'VIRTUAL_ENV' in os.environ:
pip_main(['install', 'pylint'])
EOF

Loading…
Cancel
Save