Update vimrc, remove pathogen, use ALE
This commit is contained in:
parent
c925614b6c
commit
aca557a842
50
vimrc
50
vimrc
|
@ -1,7 +1,3 @@
|
||||||
" Activate Pathogen:
|
|
||||||
execute pathogen#helptags()
|
|
||||||
execute pathogen#infect()
|
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
|
@ -16,7 +12,6 @@ set smarttab
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
set nocompatible
|
set nocompatible
|
||||||
set t_Co=256
|
set t_Co=256
|
||||||
set background=dark
|
|
||||||
set hidden
|
set hidden
|
||||||
set history=100
|
set history=100
|
||||||
set nowrap
|
set nowrap
|
||||||
|
@ -47,6 +42,7 @@ set lazyredraw
|
||||||
|
|
||||||
" Colour scheme:
|
" Colour scheme:
|
||||||
colorscheme PaperColor
|
colorscheme PaperColor
|
||||||
|
set background=dark
|
||||||
|
|
||||||
" Key mappings:
|
" Key mappings:
|
||||||
nnoremap j gj
|
nnoremap j gj
|
||||||
|
@ -59,6 +55,9 @@ map <right> <nop>
|
||||||
" Select just-pasted text:
|
" Select just-pasted text:
|
||||||
nnoremap <Leader>p `[v`]
|
nnoremap <Leader>p `[v`]
|
||||||
nnoremap Q @@
|
nnoremap Q @@
|
||||||
|
" Skip to next linter problems:
|
||||||
|
nmap <silent> <C-Right> :ALENext<cr>
|
||||||
|
nmap <silent> <C-Left> :ALEPrevious<cr>
|
||||||
|
|
||||||
" Markdown configuration:
|
" Markdown configuration:
|
||||||
autocmd FileType markdown setlocal wrap linebreak
|
autocmd FileType markdown setlocal wrap linebreak
|
||||||
|
@ -77,21 +76,30 @@ let g:CommandTMaxHeight=30
|
||||||
" Lightline configuration:
|
" Lightline configuration:
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
|
||||||
" Prettier configuration:
|
" Vim-Go configuration:
|
||||||
nmap <Leader>P <Plug>(Prettier)
|
let g:go_fmt_autosave = 0
|
||||||
let g:prettier#autoformat = 0
|
let g:go_imports_autosave = 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"
|
|
||||||
autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl
|
autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl
|
||||||
|
|
||||||
" vim-rails configuration:
|
" Vim-Rust configuration:
|
||||||
let g:rails_projections = {
|
let g:rustfmt_autosave = 0
|
||||||
\ 'app/decorators/*.rb': { 'command': 'decorator' },
|
|
||||||
\ 'app/validators/*.rb': { 'command': 'validator' },
|
" ALE configuration:
|
||||||
\ 'app/services/*.rb': { 'command': 'service' }
|
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