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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
" Some global variables are defined in ../vim.nix
" Better default options {{{
set undofile
set backup
set backupdir-=.
set mouse=a
set ignorecase
set smartcase
set smartindent
set tabstop=4
set shiftwidth=4
set inccommand=split
set scrolloff=1
set sidescrolloff=5
set colorcolumn=80
set cursorline
set modeline
set title
set wildmode=longest:full,full
let g:maplocalleader = ','
let g:mapleader = ';'
" If previously opened jump to the last position in the file
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
let &grepprg = g:ripgrep_path . ' --vimgrep $*'
let &grepformat = '%f:%l:%c:%m,' . &grepformat
let g:tex_flavor = 'latex'
" }}}
" Colors, Statusline, Tabline, Code display {{{
set termguicolors
let g:gruvbox_contrast_dark = 'soft'
let g:gruvbox_italic = 1
set background=dark
colorscheme gruvbox
" Doesn't do anything because the tabline gets overwritten by lightline
"exe 'hi! TabLineSel guifg=' . g:dominant_color
let g:lightline = {
\ 'colorscheme': 'gruvbox',
\ 'subseparator': { 'left': '|', 'right': '|' },
\ 'tab_linesubseparator': { 'left': '|', 'right': '|' },
\ }
set noshowmode
" Do not set "trail:-" because it messes up the highlighting
set listchars=tab:│\ ,extends:>,precedes:<,nbsp:+
set list
set fillchars=fold:─,vert:│
highlight ExtraWhitespace term=inverse cterm=inverse gui=inverse
" Show trailing whitespace and spaces before tabs:
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ containedin=ALL
" }}}
" Mappings {{{
call camelcasemotion#CreateMotionMappings(g:maplocalleader)
nmap =of :set <C-R>=(&formatoptions =~ "a") ? 'formatoptions-=a' : 'formatoptions+=a'<CR><CR>
" }}}
set completefunc=syntaxcomplete#Complete
set completeopt+=noinsert,noselect
" Deoplete {{{
let g:deoplete#enable_at_startup = 1
" }}}
" Neosnippets {{{
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
set conceallevel=2
set concealcursor=nv
" }}}
" CtrlP {{{
let g:ctrlp_user_command = g:fd_path . ' --type f --color never "" %s'
let g:ctrlp_use_caching = 0
" }}}
" LanguageClient {{{
let g:LanguageClient_loggingFile = stdpath('data') . '/LanguageClient.log'
let g:LanguageClient_serverStderr = stdpath('data') . '/LanguageServer.log'
" }}}
" VimWiki {{{
" {'path': '~/Documents/Wiki', 'path_html': '~/Documents/Wiki/html'} \
let g:vimwiki_list = [
\ {'path': '~/Documents/Wiki/personal',
\ 'path_html': '~/Documents/Wiki/personal/html',
\ 'auto_tags': 1},
\ {'path': '~/Documents/Wiki/science', 'path_html': '~/Documents/Wiki/science/html', 'auto_tags': 1},
\ {'path': '~/Documents/Wiki/work', 'path_html': '~/Documents/Wiki/work/html', 'auto_tags': 1},
\ ]
let g:vimwiki_global_ext = 0
let g:vimwiki_auto_header = 1
let g:vimwiki_hl_headers = 1
let g:vimwiki_hl_cb_checked = 1
let g:vimwiki_html_header_numbering = 2
let g:vimwiki_html_header_numbering_sym = '.'
let g:vimwiki_links_header_level = 2
let g:vimwiki_tags_header_level = 2
let g:vimwiki_toc_header_level = 2
call deoplete#custom#var('omni', 'input_patterns', { 'vimwiki': '\[\[\w*|\:\w+' })
" }}}
" vim: fdm=marker
|