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
|
set shell=/bin/zsh
" colors
set background=dark
colorscheme default-cterm
"let g:vimtex_matchparen_enabled=0
"let g:loaded_matchparen=1
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set number " show line numbers
set laststatus=2 " show status bar
set foldmethod=syntax
set nocompatible " allow backspacing over everything in insert mode
set backspace=indent,eol,start
set backupdir=~/.vim/swaps//
set viminfo+=n~/.vim/info
set history=200
set hidden " allow switching buffers without saving
set incsearch " do incremental searching
set hlsearch
filetype plugin indent on
syntax on
set list
set listchars=tab:\|\ " show hard tabs
set fillchars+=vert:│,fold:─
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab " tab settings
let g:airline_powerline_fonts = 0
let g:airline_theme="term"
" latex settings
let g:tex_flavor = 'latex'
let g:vimtex_view_method = 'zathura'
let g:vimtex_compiler_latexmk = {
\ 'options' : [
\ '-pdf',
\ '-shell-escape',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode'
\ ],
\}
" cpp coloraton settings
let g:cpp_class_scope_highlight = 1
let g:cpp_member_variable_highlight = 1
let g:cpp_class_decl_highlight = 1
let g:cpp_experimental_template_highlight = 1
let g:cpp_concepts_highlight = 1
let g:cpp_named_requirements_highlight = 1
" map to <Leader>cf in C++ code
autocmd FileType c,cpp,objc nnoremap <buffer><Leader>cf :<C-u>ClangFormat<CR>
autocmd FileType c,cpp,objc vnoremap <buffer><Leader>cf :ClangFormat<CR>
" if you install vim-operator-user
autocmd FileType c,cpp,objc map <buffer><Leader>x <Plug>(operator-clang-format)
" Toggle auto formatting:
nmap <Leader>C :ClangFormatAutoToggle<CR>
autocmd BufNewFile,BufRead *.wl set syntax=wl
autocmd BufNewFile,BufRead *.wls set syntax=wl
autocmd BufNewFile,BufRead *.m set syntax=wl
let g:mma_candy = 2
call plug#begin()
Plug 'voldikss/vim-mma'
Plug 'bfrg/vim-cpp-modern'
Plug 'lervag/vimtex'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'mattn/vim-lsp-settings'
Plug 'kana/vim-fakeclip'
call plug#end()
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
let g:lsp_diagnostics_float_cursor = 1
let g:lsp_document_highlight_enabled = 1
let g:fakeclip_provide_clipboard_key_mappings = !empty($WAYLAND_DISPLAY)
|