はじめに
aleを使っていますが、エラー文を出力しているALEGetStatusLine
がdeprecatedになっていた
ステータスを表示する機能自体がなくなるっぽいです
で、ale#statusline#Count
を呼び出してligthlineに渡す必要がありますが、、、面倒、それをやってくれるlightline-aleというプラグインがあるのでそれを使います
lightline-aleの設定方法
deinでの設定方法
[[plugins]] repo = 'itchyny/lightline.vim' hook_add = ''' let g:lightline = { \ 'colorscheme': 'wombat', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], \ [ 'readonly', 'filename', 'modified' ], \ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ] ], \ }, \ } ''' [[plugins]] repo = 'maximbaz/lightline-ale' depends = ['lightline.vim', 'ale'] hook_add = ''' 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', \ } ''' [[plugins]] repo = 'w0rp/ale' hook_add = ''' let b:ale_linters = { \ 'javascript': ['eslint', 'eslint-plugin-vue'], \ 'python': ['pyflakes', 'pep8'], \ 'ruby': ['rubocop'], \ 'tex': ['textlint'], \ 'markdown': ['textlint'], \ 'css': ['stylelint'], \} let g:ale_statusline_format = ['E%d', 'W%d', 'ok'] let g:ale_set_loclist = 0 let g:ale_set_quickfix = 1 nmap <silent> <C-n> <Plug>(ale_next_wrap) '''
こんな感じになります
おわりに
lightline-aleの設定手順が英語情報しかなかったので軽くまとめてみましたというのが今回の話でした