Move lang config in ftplugin to load automatically
This commit is contained in:
parent
5008ca99ce
commit
565a12a968
3 changed files with 24 additions and 12 deletions
|
@ -1,11 +1,9 @@
|
||||||
let g:ale_linters = {}
|
|
||||||
let g:ale_completion_enabled = 1
|
let g:ale_completion_enabled = 1
|
||||||
let g:ale_sign_error = "✗"
|
let g:ale_sign_error = "✗"
|
||||||
let g:ale_sign_warning = "⚠"
|
let g:ale_sign_warning = "⚠"
|
||||||
|
|
||||||
" Rust linting options
|
" Enable warnings about trailing whitespace for all files.
|
||||||
let g:ale_rust_cargo_use_clippy = 1 " installed with `rustup component add clippy-preview`
|
let b:ale_warn_about_trailing_whitespace = 1
|
||||||
let g:rustfmt_autosave = 1 " installed with `rustup component add rustfmt`
|
|
||||||
|
|
||||||
" ALE colors
|
" ALE colors
|
||||||
highlight ALEWarning ctermbg=Yellow
|
highlight ALEWarning ctermbg=Yellow
|
||||||
|
|
|
@ -1,12 +1,22 @@
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set textwidth=79
|
||||||
|
set expandtab
|
||||||
|
set autoindent
|
||||||
|
set fileformat=unix
|
||||||
|
set number
|
||||||
|
|
||||||
" Enable folding on indent
|
" Enable folding on indent
|
||||||
set foldmethod=indent
|
set foldmethod=indent
|
||||||
set foldlevel=99
|
set foldlevel=99
|
||||||
|
|
||||||
au BufNewFile,BufRead *.py
|
" Lint and check types
|
||||||
\ set tabstop=4
|
let b:ale_linters = ['mypy', 'pyls', 'pylint']
|
||||||
\ set softtabstop=4
|
let g:ale_lint_on_save = 1
|
||||||
\ set shiftwidth=4
|
let g:ale_list_window_size = 20
|
||||||
\ set textwidth=79
|
" Fix syntax with autopep8.
|
||||||
\ set expandtab
|
let b:ale_fixers = ['autopep8']
|
||||||
\ set autoindent
|
let g:ale_fix_on_save = 1
|
||||||
\ set fileformat=unix
|
" Use .venv as a global default
|
||||||
|
let g:ale_virtualenv_dir_names = ['.venv']
|
||||||
|
|
|
@ -3,3 +3,7 @@ nmap gs <Plug>(rust-def-split)
|
||||||
nmap gx <Plug>(rust-def-vertical)
|
nmap gx <Plug>(rust-def-vertical)
|
||||||
nmap <leader>gd <Plug>(rust-doc)
|
nmap <leader>gd <Plug>(rust-doc)
|
||||||
set number
|
set number
|
||||||
|
|
||||||
|
" linting options
|
||||||
|
let g:ale_rust_cargo_use_clippy = 1 " installed with `rustup component add clippy-preview`
|
||||||
|
let g:rustfmt_autosave = 1 " installed with `rustup component add rustfmt`
|
||||||
|
|
Loading…
Add table
Reference in a new issue