[FIX][VIM] Unlet ftplugin variables without errors
This commit is contained in:
parent
3261e83e85
commit
94ed7a9e9e
|
@ -3,12 +3,12 @@ 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'
|
||||
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'
|
||||
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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
||||
|
|
|
@ -3,12 +3,12 @@ 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'
|
||||
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'
|
||||
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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'
|
||||
|
|
|
@ -3,12 +3,12 @@ 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'
|
||||
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'
|
||||
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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'
|
||||
|
|
|
@ -3,4 +3,4 @@ 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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
|
|
@ -3,4 +3,4 @@ call ftplugined#check_undo_ft()
|
|||
|
||||
" Don't highlight trailing whitespace in fugitive windows
|
||||
let b:better_whitespace_enabled=0
|
||||
let b:undo_ftplugin.='|unlet b:better_whitespace_enabled'
|
||||
let b:undo_ftplugin.='|unlet! b:better_whitespace_enabled'
|
||||
|
|
|
@ -3,4 +3,4 @@ call ftplugined#check_undo_ft()
|
|||
|
||||
" Don't highlight trailing whitespace in help windows
|
||||
let b:better_whitespace_enabled=0
|
||||
let b:undo_ftplugin.='|unlet b:better_whitespace_enabled'
|
||||
let b:undo_ftplugin.='|unlet! b:better_whitespace_enabled'
|
||||
|
|
|
@ -3,4 +3,4 @@ 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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
|
|
@ -3,4 +3,4 @@ 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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_linter_aliases'
|
||||
|
|
|
@ -3,14 +3,14 @@ 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'
|
||||
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'
|
||||
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'
|
||||
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={
|
||||
|
@ -22,18 +22,18 @@ let b:ale_python_pyls_config={
|
|||
\ },
|
||||
\ },
|
||||
\ }
|
||||
let b:undo_ftplugin.='|unlet b:ale_python_pyls_config'
|
||||
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'
|
||||
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'
|
||||
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'
|
||||
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
|
||||
|
|
|
@ -3,16 +3,16 @@ 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'
|
||||
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'
|
||||
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'
|
||||
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_use_clippy'
|
||||
|
||||
" Use rustfmt as ALE fixer for rust
|
||||
let b:ale_fixers=[ 'rustfmt' ]
|
||||
let b:undo_ftplugin.='|unlet b:ale_fixers'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
|
|
@ -3,12 +3,12 @@ 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'
|
||||
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'
|
||||
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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
||||
|
|
|
@ -3,12 +3,12 @@ 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'
|
||||
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'
|
||||
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'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
||||
|
|
Loading…
Reference in a new issue