This repository has been archived by the owner on Oct 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
60 lines (47 loc) · 1.7 KB
/
init.vim
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
" https://github.com/neovim/neovim/issues/5990
" Can cause weird issues but the below should solve it
set guicursor= " prevents weird shit
let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 0 " prevents weird shit
set termguicolors " allows full colours
call plug#begin()
Plug 'autozimu/LanguageClient-neovim'
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'}
Plug 'junegunn/fzf'
Plug 'roxma/nvim-completion-manager'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'majutsushi/tagbar'
Plug 'w0rp/ale'
Plug 'morhetz/gruvbox'
" Plug 'easymotion/vim-easymotion'
call plug#end()
set hidden " boh
set number " shows line numbers
set relativenumber " makes numbers relative so can jump to lines
set autoread " auto updates file on change
set autoindent
set smartindent
set smartcase " only considers case when uppercase
set expandtab " presing tab inserts spaces
set smarttab
set tabstop=4
set shiftwidth=4
let g:LanguageClient_serverCommands = {
\ 'rust': ['rustup', 'run', 'beta', 'rls'],
\ }
" allows fuzzy matching using the_silver_searcher
let g:cm_matcher = {'module': 'cm_matchers.abbrev_matcher'}
nnoremap <silent> K call LanguageClient_textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
map <C-f> :NERDTreeToggle<CR>
" map <C-t> :TagbarToggle<CR>
" automatically start the language server and ALE when opening a rust type
" file
autocmd FileType rust LanguageClientStart
autocmd FileType rust ALEEnable
" gruvbox dark mode
colorscheme gruvbox
set background=dark