Install and configure new text linters

This commit is contained in:
ViViDboarder 2019-10-29 12:33:08 -07:00
parent 6d67d84fc5
commit cf9a69eede
2 changed files with 24 additions and 14 deletions

View File

@ -31,6 +31,11 @@ pip3 install --user vim-vint
pip install --user yamllint pip install --user yamllint
pip3 install --user yamllint pip3 install --user yamllint
# Text / Markdown
npm install -g alex
pip install --user proselint
pip3 install --user proselint
# Makefile # Makefile
# https://github.com/mrtazz/checkmake # https://github.com/mrtazz/checkmake

View File

@ -62,29 +62,34 @@ elseif has('nvim') || v:version >= 800
" NOTE: Some of these are installed when bootstrapping environment, " NOTE: Some of these are installed when bootstrapping environment,
" outside of vim setup " outside of vim setup
let g:ale_linters = { let g:ale_linters = {
\ 'go': ['gopls', 'golint', 'gometalinter'], \ 'go': ['gopls', 'golint', 'gometalinter'],
\ 'python': ['pyls', 'flake8', 'mypy', 'pylint'], \ 'python': ['pyls', 'flake8', 'mypy', 'pylint'],
\ 'rust': ['rls', 'cargo'], \ 'rust': ['rls', 'cargo'],
\ 'sh': ['language_server', 'shell', 'shellcheck'], \ 'sh': ['language_server', 'shell', 'shellcheck'],
\ 'text': ['proselint', 'alex'],
\} \}
let g:ale_linter_aliases = {
\ 'markdown': ['text'],
\}
" More than a few languages use the same fixers
let s:ale_pretty_trim_fixer = ['prettier', 'trim_whitespace', 'remove_trailing_lines']
let g:ale_fixers = { let g:ale_fixers = {
\ 'go': ['gofmt', 'goimports'], \ 'go': ['gofmt', 'goimports'],
\ 'json': ['prettier', 'remove_trailing_lines'], \ 'json': s:ale_pretty_trim_fixer,
\ 'markdown': ['trim_whitespace', 'remove_trailing_lines'], \ 'rust': ['rustfmt'],
\ 'rust': ['rustfmt'], \ 'markdown': s:ale_pretty_trim_fixer,
\ 'yaml': ['prettier', 'remove_trailing_lines'], \ 'yaml': ['prettier', 'remove_trailing_lines'],
\ 'css': s:ale_pretty_trim_fixer,
\ 'javascript': s:ale_pretty_trim_fixer,
\} \}
" Auto-complete from ALE, possible alternative to asyncomplete
" let g:ale_completion_enabled = 1
" Enable asyncomplete " Enable asyncomplete
Plug 'prabirshrestha/asyncomplete.vim' Plug 'prabirshrestha/asyncomplete.vim'
" Add ALE to asyncomplete " Add ALE to asyncomplete
augroup acomp_setup augroup acomp_setup
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#ale#get_source_options({ au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#ale#get_source_options({
\ 'priority': 10, \ 'priority': 10,
\ })) \ }))
augroup end augroup end
" let g:asyncomplete_auto_popup = 0 " let g:asyncomplete_auto_popup = 0