home: vim: remove 'ALE' configuration

First step to modernising my configuration to use the native LSP client
instead.
This commit is contained in:
Bruno BELANYI 2022-02-23 17:37:33 +01:00
parent 5ce5057d0f
commit 4382904060
16 changed files with 0 additions and 214 deletions

View file

@ -1,14 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Use shfmt as ALE fixer for bash
let b:ale_fixers=[ 'shfmt' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
" Use bash dialect explicitly, require explicit empty string test
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'

View file

@ -1,14 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" More warnings and the usual version in flags for Clang
let b:ale_c_clang_options='-Wall -Wextra -pedantic -std=c99'
let b:undo_ftplugin.='|unlet! b:ale_c_clang_options'
" More warnings and the usual version in flags for GCC
let b:ale_c_gcc_options='-Wall -Wextra -pedantic -std=c99'
let b:undo_ftplugin.='|unlet! b:ale_c_gcc_options'
" Use compile_commands.json to look for additional flags
let b:ale_c_parse_compile_commands=1
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'

View file

@ -1,14 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" More warnings and the usual version in flags for Clang
let b:ale_cpp_clang_options='-Wall -Wextra -pedantic -std=c++17'
let b:undo_ftplugin.='|unlet! b:ale_cpp_clang_options'
" More warnings and the usual version in flags for GCC
let b:ale_cpp_gcc_options='-Wall -Wextra -pedantic -std=c++17'
let b:undo_ftplugin.='|unlet! b:ale_cpp_gcc_options'
" Use compile_commands.json to look for additional flags
let b:ale_c_parse_compile_commands=1
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'

View file

@ -1,6 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Use my desired ALE fixer for D
let b:ale_fixers=[ 'dfmt' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'

View file

@ -1,2 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()

View file

@ -5,26 +5,6 @@ call ftplugined#check_undo_ft()
setlocal shiftwidth=2
let b:undo_ftplugin.='|setlocal shiftwidth<'
" Use my desired ALE fixers for Haskell
let b:ale_fixers=[ 'brittany' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'
" Use stack-managed `hlint`
let b:ale_haskell_hlint_executable='stack'
let b:undo_ftplugin.='|unlet! b:ale_haskell_hlint_executable'
" Use stack-managed `brittany`
let b:ale_haskell_brittany_executable='stack'
let b:undo_ftplugin.='|unlet! b:ale_haskell_brittany_executable'
" Use dynamic libraries because of Arch linux, with default ALE options
let b:ale_haskell_ghc_options='--dynamic -fno-code -v0'
let b:undo_ftplugin.='|unlet! b:ale_haskell_ghc_options'
" Automatically format files when saving them
let b:ale_fix_on_save=1
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
" Change max length of a line to 100 for this buffer to match official guidelines
setlocal colorcolumn=100
let b:undo_ftplugin.='|setlocal colorcolumn<'

View file

@ -1,6 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Use my desired ALE fixer for JSON
let b:ale_fixers=[ 'jq' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'

View file

@ -1,10 +1,6 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Let ALE know that I want Markdown linters
let b:ale_linter_aliases=[ 'markdown' ]
let b:undo_ftplugin.='|unlet! b:ale_linter_aliases'
" Use a small indentation value on Pandoc files
setlocal shiftwidth=2
let b:undo_ftplugin.='|setlocal shiftwidth<'

View file

@ -1,40 +1,6 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Use my desired ALE fixers for python
let b:ale_fixers=[ 'black', 'isort' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'
" Use my desired ALE linters for python
let b:ale_linters=[ 'flake8', 'mypy', 'pylint', 'pyls' ]
let b:undo_ftplugin.='|unlet! b:ale_linters'
" Use pyls inside the python environment if needed
let b:ale_python_pyls_auto_pipenv=1
let b:undo_ftplugin.='|unlet! b:ale_python_pyls_auto_pipenv'
" Disable pycodestyle checks from pyls because I'm already using flake8
let b:ale_python_pyls_config={
\ 'pyls': {
\ 'plugins': {
\ 'pycodestyle': {
\ 'enabled': v:false
\ },
\ },
\ },
\ }
let b:undo_ftplugin.='|unlet! b:ale_python_pyls_config'
" Don't use mypy to check for syntax errors
let b:ale_python_mypy_ignore_invalid_syntax=1
let b:undo_ftplugin.='|unlet! b:ale_python_mypy_ignore_invalid_syntax'
" Use mypy inside the python environment if needed
let b:ale_python_mypy_auto_pipenv=1
let b:undo_ftplugin.='|unlet! b:ale_python_mypy_auto_pipenv'
" Automatically format files when saving them
let b:ale_fix_on_save=1
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
" Change max length of a line to 88 for this buffer to match black's settings
setlocal colorcolumn=88
let b:undo_ftplugin.='|setlocal colorcolumn<'

View file

@ -1,31 +1,6 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Check tests too
let b:ale_rust_cargo_check_tests=1
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_tests'
" Check examples too
let b:ale_rust_cargo_check_examples=1
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_examples'
" Use clippy if it's available instead of just cargo check
let b:ale_rust_cargo_use_clippy=executable('cargo-clippy')
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_use_clippy'
" Use rust-analyzer instead of RLS as a linter
let b:ale_linters=[ 'cargo', 'analyzer' ]
let b:undo_ftplugin='|unlet! b:ale_linters'
" Use rustfmt as ALE fixer for rust
let b:ale_fixers=[ 'rustfmt' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'
" Automatically format files when saving them
let b:ale_fix_on_save=1
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
" Change max length of a line to 99 for this buffer to match official guidelines
setlocal colorcolumn=99
let b:undo_ftplugin.='|setlocal colorcolumn<'

View file

@ -1,14 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Use shfmt as ALE fixer for sh
let b:ale_fixers=[ 'shfmt' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'
" Indent with 4 spaces, simplify the code, indent switch cases, use POSIX
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln posix'
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
" Require explicit empty string test
let b:ale_sh_shellcheck_options='-o avoid-nullary-conditions'
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'

View file

@ -1,14 +0,0 @@
" Create the `b:undo_ftplugin` variable if it doesn't exist
call ftplugined#check_undo_ft()
" Use shfmt as ALE fixer for zsh
let b:ale_fixers=[ 'shfmt' ]
let b:undo_ftplugin.='|unlet! b:ale_fixers'
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
" Use bash dialect explicitly, require explicit empty string test
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'

View file

@ -1,2 +0,0 @@
" Use ALE LSP-powered symbol information
nnoremap <Leader>K :ALEHover<CR>

View file

@ -63,8 +63,6 @@ in
git-messenger-vim # A simple blame window
# LSP and linting
ale # Asynchronous Linting Engine
lightline-ale # Status bar integration
];
extraConfig = builtins.readFile ./init.vim;

View file

@ -1,24 +0,0 @@
" Always display the sign column to avoid moving the buffer all the time
let g:ale_sign_column_always=1
" Change the way ALE display messages
let g:ale_echo_msg_info_str='I'
let g:ale_echo_msg_warning_str='W'
let g:ale_echo_msg_error_str='E'
" The message displayed in the command line area
let g:ale_echo_msg_format='[%linter%][%severity%]%(code):% %s'
" The message displayed in the location list
let g:ale_loclist_msg_format='[%linter%]%(code):% %s'
" Don't lint every time I change the buffer
let g:ale_lint_on_text_changed=0
" Don't lint on leaving insert mode
let g:ale_lint_on_insert_leave=0
" Don't lint on entering a buffer
let g:ale_lint_on_enter=0
" Do lint on save
let g:ale_lint_on_save=1
" Lint on changing the filetype
let g:ale_lint_on_filetype_changed=1

View file

@ -15,7 +15,6 @@ let g:lightline.active={
\ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ],
\ [ 'linter_check', 'linter_errors', 'linter_warn', 'linter_ok' ],
\ [ 'ctags_status' ],
\ ]
\ }
@ -38,29 +37,11 @@ let g:lightline.component_function={
\ 'gitbranch': 'LightlineFugitive',
\ }
" Which component can be expanded by using which function
let g:lightline.component_expand={
\ 'linter_check': 'lightline#ale#checking',
\ 'linter_warn': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ }
" How to color custom components
let g:lightline.component_type={
\ 'readonly': 'error',
\ 'linter_checking': 'left',
\ 'linter_warn': 'warning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'left',
\ }
" Show pretty icons instead of text for linting status
let g:lightline#ale#indicator_checking='⏳'
let g:lightline#ale#indicator_warnings='◆'
let g:lightline#ale#indicator_errors='✗'
let g:lightline#ale#indicator_ok='✓'
" Show a lock icon when editing a read-only file when it makes sense
function! LightlineReadonly()
return &ft!~?'help\|vimfiler\|netrw' && &readonly ? '🔒' : ''