Update vimrc, remove pathogen, use ALE
This commit is contained in:
parent
c925614b6c
commit
aca557a842
48
vimrc
48
vimrc
|
@ -1,7 +1,3 @@
|
|||
" Activate Pathogen:
|
||||
execute pathogen#helptags()
|
||||
execute pathogen#infect()
|
||||
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
|
@ -16,7 +12,6 @@ set smarttab
|
|||
set encoding=utf-8
|
||||
set nocompatible
|
||||
set t_Co=256
|
||||
set background=dark
|
||||
set hidden
|
||||
set history=100
|
||||
set nowrap
|
||||
|
@ -47,6 +42,7 @@ set lazyredraw
|
|||
|
||||
" Colour scheme:
|
||||
colorscheme PaperColor
|
||||
set background=dark
|
||||
|
||||
" Key mappings:
|
||||
nnoremap j gj
|
||||
|
@ -59,6 +55,9 @@ map <right> <nop>
|
|||
" Select just-pasted text:
|
||||
nnoremap <Leader>p `[v`]
|
||||
nnoremap Q @@
|
||||
" Skip to next linter problems:
|
||||
nmap <silent> <C-Right> :ALENext<cr>
|
||||
nmap <silent> <C-Left> :ALEPrevious<cr>
|
||||
|
||||
" Markdown configuration:
|
||||
autocmd FileType markdown setlocal wrap linebreak
|
||||
|
@ -77,21 +76,30 @@ let g:CommandTMaxHeight=30
|
|||
" Lightline configuration:
|
||||
set laststatus=2
|
||||
|
||||
" Prettier configuration:
|
||||
nmap <Leader>P <Plug>(Prettier)
|
||||
let g:prettier#autoformat = 0
|
||||
autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less,*.graphql Prettier
|
||||
|
||||
" vim-rust configuration:
|
||||
let g:rustfmt_autosave = 1
|
||||
|
||||
" vim-go configuration:
|
||||
let g:go_fmt_command = "goimports"
|
||||
" Vim-Go configuration:
|
||||
let g:go_fmt_autosave = 0
|
||||
let g:go_imports_autosave = 0
|
||||
autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl
|
||||
|
||||
" vim-rails configuration:
|
||||
let g:rails_projections = {
|
||||
\ 'app/decorators/*.rb': { 'command': 'decorator' },
|
||||
\ 'app/validators/*.rb': { 'command': 'validator' },
|
||||
\ 'app/services/*.rb': { 'command': 'service' }
|
||||
" Vim-Rust configuration:
|
||||
let g:rustfmt_autosave = 0
|
||||
|
||||
" ALE configuration:
|
||||
let g:ale_linters = {
|
||||
\ 'javascript': ['eslint'],
|
||||
\ 'go': ['govet', 'golint'],
|
||||
\ 'rust': ['cargo']
|
||||
\ }
|
||||
let g:ale_fixers = {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\ 'javascript': ['prettier'],
|
||||
\ 'go': ['gofmt', 'goimports'],
|
||||
\ 'rust': ['rustfmt']
|
||||
\ }
|
||||
let g:ale_fix_on_save = 1
|
||||
let g:ale_lint_on_text_changed = 0
|
||||
let g:ale_lint_on_enter = 1
|
||||
let g:ale_lint_on_insert_leave = 1
|
||||
let g:ale_lint_on_save = 1
|
||||
let g:ale_echo_cursor = 1
|
||||
let g:ale_rust_cargo_use_clippy = 0
|
||||
|
|
Loading…
Reference in New Issue