blob: 966bfdf4960d12ea7b9277284e014aeba28ddfc0 (
plain)
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
|
packadd snippets
" Indentation
set tabstop=8
set shiftround
set nobackup
set autoindent
set smartindent
set cindent
" Theme
syntax on
set background=light
colorscheme quiet
hi Normal ctermfg=black ctermbg=white
hi SpellBad term=reverse cterm=underline ctermfg=124 ctermbg=white
hi SpellCap term=reverse cterm=underline ctermfg=25 ctermbg=white
hi SpellRare term=reverse cterm=underline ctermfg=30 ctermbg=white
hi SpellLocal term=reverse cterm=underline ctermfg=90 ctermbg=white
" Cursor - switch between line and full
let &t_SI = "\<Esc>[6 q"
let &t_SR = "\<Esc>[4 q"
let &t_EI = "\<Esc>[2 q"
" LSP
packadd lsp
call LspAddServer([#{
\ name: 'caml',
\ filetype: ['ocaml'],
\ path: '/home/mccd/.opam/5.2.0/bin/ocamllsp',
\ args: [],
\ syncInit: v:true
\ }])
call LspAddServer([#{
\ name: 'golang',
\ filetype: ['go', 'gomod'],
\ path: '/usr/bin/gopls',
\ args: ['serve'],
\ syncInit: v:true
\ }])
" Keybindings
let mapleader=" "
noremap , :
noremap <leader>e :e **/
noremap gd mB:LspGotoDefinition<Enter>
noremap <leader>ca :LspCodeAction<Enter>
noremap <leader>k :LspDiagCurrent<Enter>
nnoremap <leader>l :ls<CR>:b<space>
nnoremap <leader>= :LspFormat<Enter>
" Spell
au BufEnter *.org set spell
" Wildmenu
set wildmenu
set wildmode=longest:full,lastused
set wildignore=_build/**,release/**
set grepprg=git\ grep\ -nH
|