-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
67 lines (61 loc) · 1.94 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
filetype plugin indent on
syntax on
set background=dark
colorscheme PaperColor
set softtabstop=8
set tabstop=8
set shiftwidth=8
set backspace=indent,eol,start
set showcmd
set ruler
set relativenumber
set ignorecase
set smartcase
set incsearch
"set hlsearch
set expandtab
set scrolloff=3
set wildmenu
set encoding=utf8
set ai
set si
set autowrite
set undodir=~/.vim/undo-dir
set undofile
set noswapfile
:packadd termdebug
:packadd ale
nmap <leader>nt :NERDTreeToggle<CR>
nmap <leader>ntf :NERDTreeFind<CR>
nmap <C-F>f <Plug>CtrlSFPrompt
nmap <C-w>t :below terminal<CR>
nnoremap <Leader>gb :<C-u>call gitblame#echo()<CR>
"au FileType go nmap <leader>r <Plug>(go-run)
"au FileType go nmap <leader>t <Plug>(go-test)
"au FileType go nmap <leader>c <Plug>(go-coverage-toggle)
au FileType go nmap <F5> :DlvToggleBreakpoint<CR>
au FileType go nmap <F6> :DlvTestCurrent<CR>
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>tf <Plug>(go-test-func)
au FileType go nmap <Leader>ren <Plug>(go-rename)
au FileType rust nmap <Leader>ren :ALERename<CR>
au FileType go nmap <Leader>r <Plug>(go-referrers)
au FileType rust nmap <Leader>r :ALEFindReferences<CR>
au FileType go nmap <Leader>f <Plug>(go-fmt)
au Filetype rust nmap <Leader>f :RustFmt<CR>
au FileType go nmap <Leader>i <Plug>(go-implements)
au FileType go nmap <Leader>inf <Plug>(go-info)
au FileType rust nmap <Leader>inf :ALEHover<CR>
au FileType go nmap <Leader>ds <Plug>(go-def-split)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
au FileType go nmap <Leader>ae <Plug>(go-alternate-edit)
au FileType go nmap <Leader>av <Plug>(go-alternate-vertical)
" Popup windows for Go documentation
let g:go_doc_popup_window = 1
" Enable lsp for Go by using gopls
let g:completor_filetype_map = {}
let g:completor_filetype_map.go = {'ft': 'lsp', 'cmd': 'gopls - remote=auto'}"
let g:termdebugger="rust-gdb"
let g:ale_linters = {'rust': ['analyzer']}
let g:ale_completion_enabled = 1
let g:rustfmt_autosave = 1