Switch to ALE for realtime syntax checking
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[user]
|
||||
name = Andrew Miner
|
||||
email = aminer@looker.com
|
||||
email = andrewminer@mac.com
|
||||
[pull]
|
||||
rebase = true
|
||||
[push]
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "Andrew"
|
||||
|
||||
" Normal
|
||||
hi Normal guifg=#FFFFFF guibg=#000000
|
||||
|
||||
" UI Chrome
|
||||
hi Cursor guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi CursorLineNr guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi LineNr guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi NonText guibg=#000000 gui=NONE
|
||||
hi Search guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi ErrorMsg guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi StatusLine guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi StatusLineNC guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
|
||||
" Syntax Highlighting
|
||||
hi Comment guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Constant guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Function guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Identifier guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Ignore guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Keyword guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Number guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi PreProc guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Special guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi SpecialKey guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Statement guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi String guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Todo guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Type guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
hi Underlined guifg=#FFFFFF guibg=#000000 gui=NONE
|
||||
@@ -1,67 +0,0 @@
|
||||
"============================================================================
|
||||
"File: tsc.vim
|
||||
"Description: TypeScript syntax checker
|
||||
"Maintainer: Bill Casarin <[email protected]>
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_typescript_tsc_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_typescript_tsc_checker = 1
|
||||
|
||||
if !exists('g:syntastic_typescript_tsc_sort')
|
||||
let g:syntastic_typescript_tsc_sort = 1
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_typescript_tsc_IsAvailable() dict
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let version_output = split(syntastic#util#system(self.getExecEscaped() . ' --version'), '\n', 1)
|
||||
let ver = filter(copy(version_output), 'v:val =~# ''\m\<Version ''')
|
||||
let parsed_ver = len(ver) ? syntastic#util#parseVersion(ver[0], '\v<Version \zs\d+(\.\d+)\ze') : []
|
||||
|
||||
if len(parsed_ver)
|
||||
call self.setVersion(parsed_ver)
|
||||
let s:tsc_new = syntastic#util#versionIsAtLeast(parsed_ver, [1, 5])
|
||||
else
|
||||
call syntastic#log#ndebug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', version_output)
|
||||
call syntastic#log#error("checker typescript/tsc: can't parse version string (abnormal termination?)")
|
||||
let s:tsc_new = -1
|
||||
endif
|
||||
|
||||
return s:tsc_new >= 0
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_typescript_tsc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': 'tsc',
|
||||
\ 'fname': '',
|
||||
\ 'args': '--noEmit -p tsconfig.json' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f %#(%l\,%c): error %m,' .
|
||||
\ '%E%f %#(%l\,%c): %m,' .
|
||||
\ '%Eerror %m,' .
|
||||
\ '%C%\s%\+%m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'postprocess': ['guards'],
|
||||
\ 'defaults': {'bufnr': bufnr('')} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'typescript',
|
||||
\ 'name': 'tsc'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
+19
-25
@@ -2,23 +2,26 @@
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
Plug 'HerringtonDarkholme/yats.vim'
|
||||
" Functionality Plugins
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
Plug 'digitaltoad/vim-pug'
|
||||
Plug 'elzr/vim-json'
|
||||
Plug 'flazz/vim-colorschemes'
|
||||
Plug 'gisraptor/vim-lilypond-integrator'
|
||||
Plug 'godlygeek/tabular'
|
||||
Plug 'jlanzarotta/bufexplorer'
|
||||
Plug 'kchmck/vim-coffee-script'
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'skammer/vim-css-color'
|
||||
Plug 'slim-template/vim-slim'
|
||||
Plug 'statianzo/vim-jade'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'vim-syntastic/syntastic'
|
||||
Plug 'w0rp/ale'
|
||||
|
||||
" Language Support Plugins
|
||||
Plug 'HerringtonDarkholme/yats.vim' " typescript
|
||||
Plug 'digitaltoad/vim-pug' " pug
|
||||
Plug 'elzr/vim-json' " json
|
||||
Plug 'gisraptor/vim-lilypond-integrator' " lilypond
|
||||
Plug 'kchmck/vim-coffee-script' " coffeescript
|
||||
Plug 'pangloss/vim-javascript' " javascript
|
||||
Plug 'plasticboy/vim-markdown' " markdown
|
||||
Plug 'slim-template/vim-slim' " slim
|
||||
Plug 'statianzo/vim-jade' " jade
|
||||
|
||||
call plug#end()
|
||||
|
||||
@@ -47,7 +50,6 @@ set expandtab
|
||||
set nohlsearch
|
||||
set incsearch
|
||||
set laststatus=2
|
||||
set listchars=eol:⏎,tab:␉·,trail:␠,nbsp:⎵
|
||||
set modelines=2
|
||||
set nofoldenable
|
||||
set nowrap
|
||||
@@ -60,7 +62,7 @@ set showbreak="+++>"
|
||||
set showcmd
|
||||
set showmatch
|
||||
set smarttab
|
||||
set statusline=%<%f\ %h%m%r%#warningmsg#%{SyntasticStatuslineFlag()}%*%=%-14.(%l,%c%V%)\ %P
|
||||
set statusline=%<%f\ %h%m%r%*%=%-14.(%l,%c%V%)\ %P
|
||||
set t_Co=256
|
||||
set tabstop=4
|
||||
set textwidth=0
|
||||
@@ -98,19 +100,10 @@ nmap =, :Tabularize /[^,]*:<CR>
|
||||
" nathanaelkane/vim-indent-guides
|
||||
let g:indent_guides_enable_on_vim_startup = 0
|
||||
|
||||
" vim-syntastic/syntastic
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_check_on_open = 0
|
||||
let g:syntastic_check_on_wq = 0
|
||||
let g:syntastic_error_symbol = "E>"
|
||||
let g:syntastic_style_error_symbol = "e>"
|
||||
let g:syntastic_style_warning_symbol = "w>"
|
||||
let g:syntastic_warning_symbol = "W>"
|
||||
|
||||
let g:syntastic_typescript_checkers = ['tsc', 'tslint']
|
||||
|
||||
let g:syntastic_typescript_tslint_args = '-p .'
|
||||
" w0rp/ale
|
||||
let g:ale_completion_delay = 500
|
||||
let g:ale_completion_enabled = 1
|
||||
let g:ale_sign_column_always = 1
|
||||
|
||||
" Key Mappings #########################################################################################################
|
||||
|
||||
@@ -135,3 +128,4 @@ endif
|
||||
" File-Type Specific Settings ##########################################################################################
|
||||
|
||||
autocmd BufRead COMMIT_EDITMSG set textwidth=70 colorcolumn=70
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
/src/init-env/bin
|
||||
@@ -44,6 +44,8 @@ pushd $HOME >/dev/null
|
||||
which -s pug || sudo npm install -g pug-cli
|
||||
which -s tsc || sudo npm install -g typescript
|
||||
which -s tslint || sudo npm install -g tslint
|
||||
which -s ts-node || sudo npm install -g ts-node
|
||||
which -s tsserver || sudo npm install -g typescript
|
||||
|
||||
echo "Installing vi plugins..."
|
||||
vim +PlugInstall +qall
|
||||
|
||||
Reference in New Issue
Block a user