-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
107 lines (90 loc) · 3.16 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
set ts=2 sw=2 sts=2 expandtab
set number
set clipboard=unnamed
set colorcolumn=80
call plug#begin('~/.local/share/nvim/plugged')
Plug 'iCyMind/NeoSolarized'
Plug 'w0rp/ale'
Plug 'tpope/vim-surround'
Plug 'roman/golden-ratio'
Plug 'jpalardy/vim-slime'
Plug 'vimlab/split-term.vim'
"ocaml
Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' }
Plug 'reasonml-editor/vim-reason-plus'
"lisp plugins
"Plug 'wlangstroth/vim-racket', { 'for': 'scheme' }
"Plug 'epeli/slimux', { 'for': 'scheme' }
"Plug 'kovisoft/paredit', { 'for': 'scheme' }
"Plug 'kovisoft/slimv'
"elixir plugins
Plug 'elixir-editors/vim-elixir', { 'for': 'elixir' }
Plug 'slashmili/alchemist.vim', { 'for': 'elixir' }
"Plug 'lucidstack/hex.vim', { 'for': 'elixir' }
"erlang plugins
Plug 'vim-erlang/vim-erlang-omnicomplete', { 'for': 'erlang' }
Plug 'vim-erlang/vim-erlang-skeletons', { 'for': 'erlang' }
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/neco-vim'
Plug 'Shougo/echodoc.vim'
"Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
"Plug 'elmcast/elm-vim', { 'for': 'elm' }
call plug#end()
" NeoSolarized
set termguicolors
" high | normal | low
let g:neosolarized_contrast = "normal"
let g:neosolarized_visibility = "normal"
" I make vertSplitBar a transparent background color.
" If you like the origin solarized vertSplitBar style more, set this value to 0.
let g:neosolarized_vertSplitBgTrans = 1
" enable/disable NeoSolarized to display bold, underlined or italicized typefaces
let g:neosolarized_bold = 1
let g:neosolarized_underline = 1
let g:neosolarized_italic = 0
colorscheme NeoSolarized
" Set background according to current time of day.
let hr = str2nr(strftime('%H'))
if hr <= 6 || hr > 18
set background=dark
else
set background=light
endif
function! MyOnBattery()
if filereadable('/sys/class/power_supply/ACAD/online')
return readfile('/sys/class/power_supply/ACAD/online') == ['0']
else
return 0
endif
endfunction
"ALE
if MyOnBattery()
"call neomake#configure#automake('rw')
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_enter = 0
"else
"call neomake#configure#automake('nrw', 500)
endif
let g:deoplete#enable_at_startup = 1
let g:slime_target = "neovim"
set splitright
set splitbelow
"ocaml
let g:opamshare = substitute(system('opam config var share'),'\n$','','')
execute "set rtp+=" . g:opamshare . "/merlin/vim"
let g:LanguageClient_serverCommands = { 'reason': ['ocaml-language-server', '--stdio'], 'ocaml': ['ocaml-language-server', '--stdio'], }
let g:LanguageClient_autoStart = 1
let g:ale_ocaml_ols_use_global = 1
nnoremap <silent> gd :call LanguageClient_textDocument_definition()<cr>
nnoremap <silent> gf :call LanguageClient_textDocument_formatting()<cr>
nnoremap <silent> <cr> :call LanguageClient_textDocument_hover()<cr>
"if has("autocmd")
" au BufReadPost *.rkt,rktl set filetype=scheme
"endif
"autocmd bufread,bufnewfile *.lisp,*.scm,*.rkt setlocal equalprg=scmindent.lua
"autocmd filetype lisp,scheme,racket setlocal equalprg=scmindent.lua
"let g:split_term_vertical = 1
"let g:neomake_open_list = 2
"let g:neomake_list_height = 15
"set cmdheight=2
"let g:echodoc#enable_at_startup = 1