Move lang config in ftplugin to load automatically

This commit is contained in:
Vladan Popovic 2019-08-26 00:21:16 +02:00
parent 5008ca99ce
commit 565a12a968
3 changed files with 24 additions and 12 deletions

View File

@ -1,11 +1,9 @@
let g:ale_linters = {}
let g:ale_completion_enabled = 1
let g:ale_sign_error = "✗"
let g:ale_sign_warning = "⚠"
" Rust 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`
" Enable warnings about trailing whitespace for all files.
let b:ale_warn_about_trailing_whitespace = 1
" ALE colors
highlight ALEWarning ctermbg=Yellow

View File

@ -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
set foldmethod=indent
set foldlevel=99
au BufNewFile,BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
" Lint and check types
let b:ale_linters = ['mypy', 'pyls', 'pylint']
let g:ale_lint_on_save = 1
let g:ale_list_window_size = 20
" Fix syntax with autopep8.
let b:ale_fixers = ['autopep8']
let g:ale_fix_on_save = 1
" Use .venv as a global default
let g:ale_virtualenv_dir_names = ['.venv']

View File

@ -3,3 +3,7 @@ nmap gs <Plug>(rust-def-split)
nmap gx <Plug>(rust-def-vertical)
nmap <leader>gd <Plug>(rust-doc)
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`