-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
88 lines (73 loc) · 2.59 KB
/
Copy pathvimrc
File metadata and controls
88 lines (73 loc) · 2.59 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
set nocompatible
syntax on
" Disable the default Vim startup message.
set shortmess+=I
" Show line numbers.
set number
set relativenumber
" The backspace key has slightly unintuitive behavior by default. For example,
" by default, you can't backspace before the insertion point set with 'i'.
" This configuration makes backspace behave more reasonably, in that you can
" backspace over anything.
set backspace=indent,eol,start
" By default, Vim doesn't let you hide a buffer (i.e. have a buffer that isn't
" shown in any window) that has unsaved changes. This is to prevent you from "
" forgetting about unsaved changes and then quitting e.g. via `:qa!`. We find
" hidden buffers helpful enough to disable this protection. See `:help hidden`
" for more information on this.
set hidden
" This setting makes search case-insensitive when all characters in the string
" being searched are lowercase. However, the search becomes case-sensitive if
" it contains any capital letters. This makes searching more convenient.
set ignorecase
set smartcase
" Enable searching as you type, rather than waiting till you press enter.
set incsearch
" Unbind some useless/annoying default key bindings.
nmap Q <Nop> " 'Q' in normal mode enters Ex mode. You almost never want this.
" Disable audible bell because it's annoying.
set noerrorbells visualbell t_vb=
" Enable mouse support. You should avoid relying on this too much, but it can
" sometimes be convenient.
set mouse+=a
set textwidth=80
set rtp+=/usr/local/opt/fzf
set autoindent
set expandtab
set tabstop=4
set shiftwidth=4
let NERDTreeQuitOnOpen = 1
nnoremap <C-n> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
set termguicolors
set background=dark
colorscheme molokai
let g:airline_powerline_fonts = 1
call plug#begin()
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'easymotion/vim-easymotion'
Plug 'preservim/nerdcommenter'
Plug 'dense-analysis/ale'
Plug 'lifepillar/vim-mucomplete'
Plug 'preservim/nerdtree'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-fugitive'
call plug#end()
nnoremap <C-p> :Files<CR>
let g:ale_completion_enabled=1
let g:ale_linters = {
\ 'php': ['intelephense']
\}
function SetAleLSPShortcuts()
nnoremap <leader>ld :ALEGoToDefinition<CR>
nnoremap <leader>lt :ALEGoToTypeDefinition<CR>
nnoremap <leader>lx :ALEFindReferences<CR>
nnoremap <leader>li :ALEImport<CR>
nnoremap <leader>ll :ALEGoToImplementation<CR>
nnoremap <leader>lh :ALEHover<CR>
nnoremap <leader>lc :ALEComplete<CR>
nnoremap <leader>lr :ALERename<CR>
endfunction()
call SetAleLSPShortcuts()