Further ALE and gopls setup
This commit is contained in:
parent
aca557a842
commit
2c5d0d78ce
14
vimrc
14
vimrc
|
@ -56,8 +56,8 @@ map <right> <nop>
|
||||||
nnoremap <Leader>p `[v`]
|
nnoremap <Leader>p `[v`]
|
||||||
nnoremap Q @@
|
nnoremap Q @@
|
||||||
" Skip to next linter problems:
|
" Skip to next linter problems:
|
||||||
nmap <silent> <C-Right> :ALENext<cr>
|
nmap <silent> <leader>an :ALENext<cr>
|
||||||
nmap <silent> <C-Left> :ALEPrevious<cr>
|
nmap <silent> <leader>ap :ALEPrevious<cr>
|
||||||
|
|
||||||
" Markdown configuration:
|
" Markdown configuration:
|
||||||
autocmd FileType markdown setlocal wrap linebreak
|
autocmd FileType markdown setlocal wrap linebreak
|
||||||
|
@ -80,6 +80,9 @@ set laststatus=2
|
||||||
let g:go_fmt_autosave = 0
|
let g:go_fmt_autosave = 0
|
||||||
let g:go_imports_autosave = 0
|
let g:go_imports_autosave = 0
|
||||||
autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl
|
autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl
|
||||||
|
" https://github.com/golang/tools/blob/master/gopls/doc/vim.md#vim-go
|
||||||
|
let g:go_def_mode='gopls'
|
||||||
|
let g:go_info_mode='gopls'
|
||||||
|
|
||||||
" Vim-Rust configuration:
|
" Vim-Rust configuration:
|
||||||
let g:rustfmt_autosave = 0
|
let g:rustfmt_autosave = 0
|
||||||
|
@ -87,13 +90,13 @@ let g:rustfmt_autosave = 0
|
||||||
" ALE configuration:
|
" ALE configuration:
|
||||||
let g:ale_linters = {
|
let g:ale_linters = {
|
||||||
\ 'javascript': ['eslint'],
|
\ 'javascript': ['eslint'],
|
||||||
\ 'go': ['govet', 'golint'],
|
\ 'go': ['gopls'],
|
||||||
\ 'rust': ['cargo']
|
\ 'rust': ['cargo']
|
||||||
\ }
|
\ }
|
||||||
let g:ale_fixers = {
|
let g:ale_fixers = {
|
||||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'javascript': ['prettier'],
|
\ 'javascript': ['prettier'],
|
||||||
\ 'go': ['gofmt', 'goimports'],
|
\ 'go': ['goimports'],
|
||||||
\ 'rust': ['rustfmt']
|
\ 'rust': ['rustfmt']
|
||||||
\ }
|
\ }
|
||||||
let g:ale_fix_on_save = 1
|
let g:ale_fix_on_save = 1
|
||||||
|
@ -103,3 +106,6 @@ let g:ale_lint_on_insert_leave = 1
|
||||||
let g:ale_lint_on_save = 1
|
let g:ale_lint_on_save = 1
|
||||||
let g:ale_echo_cursor = 1
|
let g:ale_echo_cursor = 1
|
||||||
let g:ale_rust_cargo_use_clippy = 0
|
let g:ale_rust_cargo_use_clippy = 0
|
||||||
|
let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular'
|
||||||
|
let g:ale_command_wrapper = 'nice -n5'
|
||||||
|
let g:ale_completion_enabled = 1
|
||||||
|
|
Loading…
Reference in New Issue