-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
55 lines (42 loc) · 1.4 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
"" Path at which plugins are installed.
call plug#begin('~/.vim/plugged')
"" IDE Features
Plug 'preservim/nerdtree'
"" Vim LSP related
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
call plug#end()
"" Standard setting
"" Maps escape to j-k character sequence
inoremap jk <ESC>
let mapleader = " "
"" NerdTree SETUP
"" Sets NerdTree sidemenu width
:let g:NERDTreeWinSize=45
"" Maps the toggle command to ctrl + o
map <C-o> :NERDTreeToggle<CR>
set modifiable
syntax on
set clipboard=unnamedplus
set tabstop=4
set encoding=utf-8
filetype plugin indent on
"" SourceKit-LSP configuration
if executable('~/Documents/Dev/sourcekit-lsp/.build/debug/sourcekit-lsp')
au User lsp_setup call lsp#register_server({
\ 'name': 'sourcekit-lsp',
\ 'cmd': {server_info->['sourcekit-lsp']},
\ 'whitelist': ['swift'],
\ })
endif
"" Uncomment the line bellow If you would like to disable auto completion popup
"" let g:asyncomplete_auto_popup = 0
"" Enables tab completion
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
autocmd FileType swift setlocal omnifunc=lsp#complete
autocmd FileType swift nnoremap <C-]> :LspDefinition<CR>