mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-12-22 00:30:23 -05:00
Replace syntastic with ale
This commit is contained in:
parent
c9fd2f8a21
commit
ae8ba0a227
10 changed files with 120 additions and 264 deletions
9
.gitmodules
vendored
9
.gitmodules
vendored
|
@ -31,9 +31,6 @@
|
|||
[submodule "vim/bundle/vimfiler.vim"]
|
||||
path = vim/bundle/vimfiler.vim
|
||||
url = https://github.com/Shougo/vimfiler.vim.git
|
||||
[submodule "vim/bundle/syntastic"]
|
||||
path = vim/bundle/syntastic
|
||||
url = https://github.com/scrooloose/syntastic.git
|
||||
[submodule "vim/bundle/tcomment_vim"]
|
||||
path = vim/bundle/tcomment_vim
|
||||
url = https://github.com/tomtom/tcomment_vim.git
|
||||
|
@ -121,3 +118,9 @@
|
|||
[submodule "vim/bundle/splitjoin.vim"]
|
||||
path = vim/bundle/splitjoin.vim
|
||||
url = https://github.com/AndrewRadev/splitjoin.vim
|
||||
[submodule "vim/bundle/ale"]
|
||||
path = vim/bundle/ale
|
||||
url = https://github.com/w0rp/ale
|
||||
[submodule "vim/bundle/lightline-ale"]
|
||||
path = vim/bundle/lightline-ale
|
||||
url = https://github.com/maximbaz/lightline-ale
|
||||
|
|
|
@ -129,13 +129,14 @@ As usual, to have your system use `vimpager` in place of `less`, you'll need to
|
|||
| ?N | N | Go to the next spelling mistake |
|
||||
| ?P | N | Go to the previous spelling mistake |
|
||||
|
||||
#### Formatting ####
|
||||
#### Fixing and Formatting ####
|
||||
|
||||
| Binding | Mode | Action |
|
||||
|----------|------|---------------------------------------------------------------|
|
||||
| Leader+J | N+V | Format line/selected lines to a max width of the _textwidth_ |
|
||||
| Leader+f | N+V | Format document/selection alignment using Vim syntax |
|
||||
| Leader+f | N+V | (Markdown) Format table cursor is currently on |
|
||||
| Leader+F | N | Fix document with available ale fixers |
|
||||
| Leader+t | N | Convert all tabs into spaces and continue session with spaces |
|
||||
| Leader+T | N | Convert all spaces into tabs and continue session with tabs |
|
||||
| Leader+w | N | Remove all trailing whitespace |
|
||||
|
|
1
vim/bundle/ale
Submodule
1
vim/bundle/ale
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 05d39bc1a9eb79ff6f36b190b4612ff052812e7e
|
1
vim/bundle/lightline-ale
Submodule
1
vim/bundle/lightline-ale
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit cb4610cb2f6655f6fae12aaeffecadf083dc97e6
|
|
@ -1 +0,0 @@
|
|||
Subproject commit b7b473b2688827dcd7d8c801197b8bfc31b20dc4
|
|
@ -531,15 +531,9 @@ hi SpellLocal guisp=NONE gui=NONE guifg=NONE guibg=NONE ctermfg=NONE ctermbg=NON
|
|||
hi! link SignifyLineDelete DiffDelete
|
||||
hi! link SignifyLineChange DiffChange
|
||||
|
||||
"syntastic
|
||||
call s:X("SyntasticError","#d75f5f","","standout,bold","Red","")
|
||||
call s:X("SyntasticWarning","#ffd787","","standout,bold","Yellow","")
|
||||
hi! link SyntasticErrorLine SyntasticError
|
||||
hi! link SyntasticWarningLine SyntasticWarning
|
||||
hi! link SyntasticErrorSign SyntasticError
|
||||
hi! link SyntasticWarningSign SyntasticWarning
|
||||
hi! link qfSeparator Delimiter
|
||||
hi! link qfLineNr SyntasticError
|
||||
"ale
|
||||
call s:X("ALEErrorSign","#d75f5f","","standout,bold","Red","")
|
||||
call s:X("ALEWarningSign","#ffd787","","standout,bold","Yellow","")
|
||||
|
||||
"taglist
|
||||
hi! link TagListFileName Directory
|
||||
|
|
|
@ -177,11 +177,12 @@
|
|||
" <Backspace> | (I) -> (neocomplete) close the popup and <Backspace>
|
||||
" <Ctrl-u> | (I) -> (neocomplete) undo the most recent completion
|
||||
"
|
||||
" (formatting)
|
||||
" (fixing-and-formatting)
|
||||
" <Leader>J | (N) -> split document into lines of tw or 80
|
||||
" <Leader>J | (V) -> split selection into lines of tw or 80
|
||||
" <Leader>f | (N) -> format document and return to cursor
|
||||
" <Leader>f | (V) -> format the selection and return to cursor
|
||||
" <Leader>F | (N) -> run available ale fixers on the document
|
||||
" <Leader>t | (N) -> convert tabs into spaces
|
||||
" <Leader>T | (N) -> convert spaces into tabs
|
||||
" <Leader>w | (N) -> remove whitespace
|
||||
|
@ -522,16 +523,16 @@
|
|||
nnoremap <silent><expr> <Space>0 'zX:echo "all folds have been reset"<CR>'
|
||||
|
||||
"view commit history and diffs
|
||||
nnoremap <expr><silent> <F9> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <expr><silent> <F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <expr><silent> <F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <expr><silent> <C-F9> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <expr><silent> <C-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <expr><silent> <C-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <expr><silent> <A-F9> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <expr><silent> <A-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <expr><silent> <A-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <silent><expr> <Leader>} ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <expr><silent> <F9> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <expr><silent> <F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <expr><silent> <F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <expr><silent> <C-F9> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <expr><silent> <C-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <expr><silent> <C-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <expr><silent> <A-F9> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <expr><silent> <A-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <expr><silent> <A-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <silent><expr> <Leader>} ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
|
||||
"bindings to trigger the tagbar list of tags
|
||||
nnoremap <silent><expr> <F10> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
||||
|
@ -595,15 +596,15 @@
|
|||
set pastetoggle=<F3>
|
||||
|
||||
"toggle syntax checking
|
||||
nnoremap <silent><expr> <F4> ':SyntasticToggleAll<CR>'
|
||||
xnoremap <silent><expr> <F4> '<Esc>:SyntasticToggleAll<CR>gv'
|
||||
inoremap <silent><expr> <F4> '<C-O>:SyntasticToggleAll<CR>'
|
||||
nnoremap <silent><expr> <C-F4> ':SyntasticToggleAll<CR>'
|
||||
xnoremap <silent><expr> <C-F4> '<Esc>:SyntasticToggleAll<CR>gv'
|
||||
inoremap <silent><expr> <C-F4> '<C-O>:SyntasticToggleAll<CR>'
|
||||
nnoremap <silent><expr> <A-F4> ':SyntasticToggleAll<CR>'
|
||||
xnoremap <silent><expr> <A-F4> '<Esc>:SyntasticToggleAll<CR>gv'
|
||||
inoremap <silent><expr> <A-F4> '<C-O>:SyntasticToggleAll<CR>'
|
||||
nnoremap <silent><expr> <F4> ':ALEToggle<CR>'
|
||||
xnoremap <silent><expr> <F4> '<Esc>:ALEToggle<CR>gv'
|
||||
inoremap <silent><expr> <F4> '<C-O>:ALEToggle<CR>'
|
||||
nnoremap <silent><expr> <C-F4> ':ALEToggle<CR>'
|
||||
xnoremap <silent><expr> <C-F4> '<Esc>:ALEToggle<CR>gv'
|
||||
inoremap <silent><expr> <C-F4> '<C-O>:ALEToggle<CR>'
|
||||
nnoremap <silent><expr> <A-F4> ':ALEToggle<CR>'
|
||||
xnoremap <silent><expr> <A-F4> '<Esc>:ALEToggle<CR>gv'
|
||||
inoremap <silent><expr> <A-F4> '<C-O>:ALEToggle<CR>'
|
||||
|
||||
"toggle goyo
|
||||
nnoremap <silent><expr> <Leader>` ':Goyo<CR>'
|
||||
|
@ -702,15 +703,18 @@
|
|||
endif
|
||||
"}
|
||||
|
||||
"FORMATTING:{
|
||||
"FIXING AND FORMATTING:{
|
||||
"format width to text width (or 80 chars if text width is 0)
|
||||
nnoremap <silent><expr> <Leader>J ':let b:tw=&textwidth<CR>:if (b:tw == 0)<Bar>set tw=80<Bar>endif<CR>gg0vG$gq:if (b:tw == 0)<Bar>set tw=0<Bar>let b:tw=80<Bar>endif<CR>:echo "Document has been formatted to a width of ".b:tw." characters"<CR>'
|
||||
vnoremap <silent><expr> <Leader>J '<Esc>:let b:tw=&textwidth<CR>:if (b:tw == 0)<Bar>set tw=80<Bar>endif<CR>gvgq:if (b:tw == 0)<Bar>set tw=0<Bar>let b:tw=80<Bar>endif<CR>:echo "Selection has been formatted to a width of ".b:tw." characters"<CR>'
|
||||
|
||||
"format by Vim syntax + by Autoformat tool syntax
|
||||
"format by Vim syntax
|
||||
nnoremap <Leader>f mzgg=G`z<CR>:echo "The document has been formatted"<CR>
|
||||
vnoremap <Leader>f mz=`z<CR>:echo "The selection has been formatted"<CR>
|
||||
|
||||
"fix with ale
|
||||
nnoremap <silent><expr> <Leader>F ':ALEFix<CR>:echo "Available ale fixers have been run on the document"<CR>'
|
||||
|
||||
"convert tabs to spaces and spaces to tabs
|
||||
nnoremap <silent><expr> <Leader>t ':let b:et=&expandtab<CR>:set expandtab<CR>:retab!<CR>:let &expandtab=b:et<CR>:echo "Tabs have been converted to spaces"<CR>'
|
||||
nnoremap <silent><expr> <Leader>T ':let b:et=&expandtab<CR>:set noexpandtab<CR>:%retab!<CR>:let &expandtab=b:et<CR>:echo "Spaces have been converted to tabs"<CR>'
|
||||
|
|
22
vim/config/plugins/ale.vim
Normal file
22
vim/config/plugins/ale.vim
Normal file
|
@ -0,0 +1,22 @@
|
|||
"autostart syntax checking when vim opens to a compatible filetype (default: 0)
|
||||
if !exists("g:autostartchecker") || &diff
|
||||
let g:autostartchecker = 0
|
||||
endif
|
||||
|
||||
let g:ale_enabled = g:autostartchecker
|
||||
|
||||
" open list of warnings and errors when they exist
|
||||
let g:ale_open_list = 1
|
||||
|
||||
" don't fix on save
|
||||
let g:ale_fix_on_save = 0
|
||||
|
||||
" list of ale fixers
|
||||
let g:ale_fixers = {
|
||||
\ 'javascript': [ 'eslint' ]
|
||||
\ }
|
||||
|
||||
" don't run ale on minified files
|
||||
let g:ale_pattern_options = {
|
||||
\ '\.min\.[^\.]*$': { 'ale_linters': [], 'ale_fixers': [] },
|
||||
\ }
|
|
@ -27,14 +27,13 @@ endfunction
|
|||
function! LLFugitive()
|
||||
try
|
||||
if expand('%:t') !~? 'Tagbar\|Gundo' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||
let mark = '' " edit here for cool mark
|
||||
let mark = '' " edit here for cool mark
|
||||
let _ = fugitive#head()
|
||||
return strlen(_) ? mark._ : ''
|
||||
endif
|
||||
catch
|
||||
return ''
|
||||
endtry
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! LLFileformat()
|
||||
|
@ -67,15 +66,45 @@ function! TagbarStatusFunc(current, sort, fname, ...) abort
|
|||
return lightline#statusline(0)
|
||||
endfunction
|
||||
|
||||
augroup AutoSyntastic
|
||||
autocmd!
|
||||
autocmd BufWritePost * call s:syntastic()
|
||||
augroup END
|
||||
let g:lightline = {}
|
||||
|
||||
function! s:syntastic()
|
||||
SyntasticCheck
|
||||
call lightline#update()
|
||||
endfunction
|
||||
let g:lightline.colorscheme = 'darkcloud'
|
||||
let g:lightline#ale#indicator_checking = ""
|
||||
let g:lightline#ale#indicator_warnings = "W:"
|
||||
let g:lightline#ale#indicator_errors = "E:"
|
||||
let g:lightline#ale#indicator_ok = "OK"
|
||||
|
||||
let g:lightline.component_function = {
|
||||
\ 'fugitive': 'LLFugitive',
|
||||
\ 'filename': 'LLFilename',
|
||||
\ 'fileformat': 'LLFileformat',
|
||||
\ 'filetype': 'LLFiletype',
|
||||
\ 'fileencoding': 'LLFileencoding',
|
||||
\ 'mode': 'LLMode'
|
||||
\ }
|
||||
|
||||
let g:lightline.component_expand = {
|
||||
\ 'linter_checking': 'lightline#ale#checking',
|
||||
\ 'linter_warnings': 'lightline#ale#warnings',
|
||||
\ 'linter_errors': 'lightline#ale#errors',
|
||||
\ 'linter_ok': 'lightline#ale#ok'
|
||||
\ }
|
||||
|
||||
let g:lightline.component_type = {
|
||||
\ 'linter_checking': 'left',
|
||||
\ 'linter_warnings': 'warning',
|
||||
\ 'linter_errors': 'error',
|
||||
\ 'linter_ok': 'left'
|
||||
\ }
|
||||
|
||||
let g:lightline.component = {
|
||||
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}'
|
||||
\ }
|
||||
|
||||
let g:lightline.active = {
|
||||
\ 'left': [[ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ]],
|
||||
\ 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ], [ 'lineinfo', 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ]]
|
||||
\ }
|
||||
|
||||
"status bar config with and without powerline fonts (default: 0)
|
||||
if !exists("g:powerlinefonts")
|
||||
|
@ -83,59 +112,11 @@ if !exists("g:powerlinefonts")
|
|||
endif
|
||||
|
||||
if (g:powerlinefonts == 1)
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'darkcloud',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ] ],
|
||||
\ 'right': [ [ 'syntastic', 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'fugitive': 'LLFugitive',
|
||||
\ 'filename': 'LLFilename',
|
||||
\ 'fileformat': 'LLFileformat',
|
||||
\ 'filetype': 'LLFiletype',
|
||||
\ 'fileencoding': 'LLFileencoding',
|
||||
\ 'mode': 'LLMode',
|
||||
\ },
|
||||
\ 'component_expand': {
|
||||
\ 'syntastic': 'SyntasticStatuslineFlag',
|
||||
\ },
|
||||
\ 'component_type': {
|
||||
\ 'syntastic': 'error',
|
||||
\ },
|
||||
\ 'separator': {'left': '', 'right': ''},
|
||||
\ 'subseparator': {'left': '', 'right': ''},
|
||||
\ 'component': {
|
||||
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}',
|
||||
\ },
|
||||
\ }
|
||||
let g:lightline.separator = { 'left': '', 'right': '' }
|
||||
let g:lightline.subseparator = { 'left': '', 'right': '' }
|
||||
else
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'darkcloud',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ] ],
|
||||
\ 'right': [ [ 'syntastic', 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'fugitive': 'LLFugitive',
|
||||
\ 'filename': 'LLFilename',
|
||||
\ 'fileformat': 'LLFileformat',
|
||||
\ 'filetype': 'LLFiletype',
|
||||
\ 'fileencoding': 'LLFileencoding',
|
||||
\ 'mode': 'LLMode',
|
||||
\ },
|
||||
\ 'component_expand': {
|
||||
\ 'syntastic': 'SyntasticStatuslineFlag',
|
||||
\ },
|
||||
\ 'component_type': {
|
||||
\ 'syntastic': 'error',
|
||||
\ },
|
||||
\ 'separator': {'left': '', 'right': ''},
|
||||
\ 'subseparator': {'left': '|', 'right': '|'},
|
||||
\ 'component': {
|
||||
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}',
|
||||
\ }
|
||||
\ }
|
||||
let g:lightline.separator = { 'left': '', 'right': '' }
|
||||
let g:lightline.subseparator = { 'left': '|', 'right': '|' }
|
||||
endif
|
||||
|
||||
"ligtline theme {{{
|
||||
|
@ -151,24 +132,24 @@ endif
|
|||
let s:ycol = '#ffd787'
|
||||
let s:bcol = '#87d7ff'
|
||||
|
||||
let s:p = {'normal':{},'inactive':{},'insert':{},'replace':{},'visual':{},'tabline':{}}
|
||||
let s:p = { 'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {} }
|
||||
|
||||
let s:p.normal.left = [[ s:bcol,s:base1 ],[ s:base6,s:base0 ]]
|
||||
let s:p.normal.right = [[ s:base4,s:base1 ],[ s:base6,s:base0 ]]
|
||||
let s:p.inactive.left = [[ s:base6,s:base0 ],[ s:base4,s:base1 ]]
|
||||
let s:p.inactive.right = [[ s:base4,s:base1 ],[ s:base6,s:base0 ]]
|
||||
let s:p.insert.left = [[ s:rcol,s:base1 ],[ s:base6,s:base0 ]]
|
||||
let s:p.replace.left = [[ s:base1,s:rcol ],[ s:base6,s:base0 ]]
|
||||
let s:p.visual.left = [[ s:ycol,s:base1 ],[ s:base6,s:base0 ]]
|
||||
let s:p.normal.left = [[ s:bcol, s:base1 ], [ s:base6, s:base0 ]]
|
||||
let s:p.normal.right = [[ s:base4, s:base1 ], [ s:base6, s:base0 ]]
|
||||
let s:p.inactive.left = [[ s:base6, s:base0 ], [ s:base4, s:base1 ]]
|
||||
let s:p.inactive.right = [[ s:base4, s:base1 ], [ s:base6, s:base0 ]]
|
||||
let s:p.insert.left = [[ s:rcol, s:base1 ], [ s:base6, s:base0 ]]
|
||||
let s:p.replace.left = [[ s:base1, s:rcol ], [ s:base6, s:base0 ]]
|
||||
let s:p.visual.left = [[ s:ycol, s:base1 ], [ s:base6, s:base0 ]]
|
||||
|
||||
let s:p.normal.middle = [[ s:base4,s:base1 ]]
|
||||
let s:p.inactive.abmiddle = [[ s:base3,s:base1 ]]
|
||||
let s:p.tabline.left = [[ s:base5,s:base0 ]]
|
||||
let s:p.tabline.tabsel = [[ s:base5,s:base1 ]]
|
||||
let s:p.tabline.middle = [[ s:base0,s:base4 ]]
|
||||
let s:p.normal.middle = [[ s:base4, s:base1 ]]
|
||||
let s:p.inactive.abmiddle = [[ s:base3, s:base1 ]]
|
||||
let s:p.tabline.left = [[ s:base5, s:base0 ]]
|
||||
let s:p.tabline.tabsel = [[ s:base5, s:base1 ]]
|
||||
let s:p.tabline.middle = [[ s:base0, s:base4 ]]
|
||||
let s:p.tabline.right = copy(s:p.normal.right)
|
||||
let s:p.normal.error = [[ s:rcol,s:base1 ]]
|
||||
let s:p.normal.warning = [[ s:ycol,s:base1 ]]
|
||||
let s:p.normal.error = [[ s:rcol, s:base1 ]]
|
||||
let s:p.normal.warning = [[ s:ycol, s:base1 ]]
|
||||
|
||||
let g:lightline#colorscheme#darkcloud#palette = lightline#colorscheme#fill(s:p)
|
||||
"}}}
|
||||
|
|
|
@ -1,150 +0,0 @@
|
|||
"autostart syntax checking when vim opens to a compatible filetype (default: 0)
|
||||
if !exists("g:autostartchecker")
|
||||
let g:autostartchecker = 0
|
||||
endif
|
||||
|
||||
if &diff
|
||||
let g:autostartchecker = 0
|
||||
else
|
||||
if (g:autostartchecker == 1)
|
||||
let g:syntastic_mode_map = {
|
||||
\ 'mode':'active',
|
||||
\ 'active_filetypes':[],
|
||||
\ 'passive_filetypes':[]
|
||||
\ }
|
||||
|
||||
let g:syntastic_check_on_open = 1
|
||||
else
|
||||
let g:syntastic_mode_map = {
|
||||
\ 'mode':'passive',
|
||||
\ 'active_filetypes':[],
|
||||
\ 'passive_filetypes':[]
|
||||
\ }
|
||||
|
||||
let g:syntastic_check_on_open = 0
|
||||
endif
|
||||
|
||||
"configure warnings/errors that should be silenced by module
|
||||
let g:syntastic_less_lessc_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'NameError:.* is undefined',
|
||||
\ 'FileError:.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_scss_sass_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'File to import not found or unreadable.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_java_javac_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'cannot find symbol.*',
|
||||
\ 'method does not override or implement a method from a supertype.*',
|
||||
\ 'package [^\ ]* does not exist.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_javascript_eslint_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.* is defined but never used',
|
||||
\ "'[^']*' is not defined",
|
||||
\ 'Missing "use strict" statement',
|
||||
\ 'Unexpected [^ ]* statement.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_javascript_jshint_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'Expected an assignment or function call and instead saw an expression.'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_javascript_standard_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.* is defined but never used',
|
||||
\ "'[^']*' is not defined"
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_markdown_mdl_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.*MD013.*',
|
||||
\ '.*MD002.*',
|
||||
\ '.*MD029.*'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_python_flake8_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.*\[W293\]',
|
||||
\ '.*\[E501\]'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_php_phpmd_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'Avoid using short method names like.*',
|
||||
\ 'Avoid variables with short names like.*',
|
||||
\ 'The method.*has [0-9][0-9]* lines of code.*',
|
||||
\ 'The method.*has a Cyclomatic Complexity.*',
|
||||
\ 'The method.*has an NPath complexity.*',
|
||||
\ 'The function.*has a Cyclomatic Complexity.*',
|
||||
\ 'The function.*has an NPath complexity.*',
|
||||
\ 'The function.*Avoid really long methods\.',
|
||||
\ 'The class.*has an overall complexity.*',
|
||||
\ 'The class.*has.*public methods.*',
|
||||
\ 'The class.*lines of code'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_sh_bashate_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ 'Indent not multiple of 4'
|
||||
\ ]}
|
||||
|
||||
let g:syntastic_sh_shellcheck_quiet_messages = {
|
||||
\ 'regex':[
|
||||
\ '.*\[SC1001\]',
|
||||
\ '.*\[SC2015\]',
|
||||
\ '.*\[SC2016\]',
|
||||
\ '.*\[SC2029\]',
|
||||
\ '.*\[SC2034\]',
|
||||
\ '.*\[SC2148\]',
|
||||
\ '.*\[SC2181\]',
|
||||
\ '.*follow non-constant source',
|
||||
\ 'Not following:'
|
||||
\ ]}
|
||||
|
||||
autocmd BufNewFile,BufRead PKGBUILD,bash.bashrc,.bashrc let g:syntastic_quiet_messages = {"level":"warnings"}
|
||||
|
||||
let g:syntastic_check_on_wq = 0
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_loc_list_height = 5
|
||||
endif
|
||||
|
||||
"function to enable syntastic and set check_on_open on
|
||||
function s:SyntasticToggleOn()
|
||||
let g:syntastic_check_on_open = 1
|
||||
|
||||
if (g:syntastic_mode_map.mode == "passive")
|
||||
SyntasticToggleMode
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command! -buffer SyntasticToggleOn call s:SyntasticToggleOn()
|
||||
|
||||
"function to disable syntastic and set check_on_open off
|
||||
function s:SyntasticToggleOff()
|
||||
let g:syntastic_check_on_open = 0
|
||||
|
||||
if (g:syntastic_mode_map.mode == "active")
|
||||
SyntasticToggleMode
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command! -buffer SyntasticToggleOff call s:SyntasticToggleOff()
|
||||
|
||||
"function to toggle syntastic and check_on_open on and off together
|
||||
function s:SyntasticToggleAll()
|
||||
if (g:syntastic_check_on_open == 1)
|
||||
call s:SyntasticToggleOff()
|
||||
else
|
||||
call s:SyntasticToggleOn()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command! -buffer SyntasticToggleAll call s:SyntasticToggleAll()
|
Loading…
Reference in a new issue