summaryrefslogtreecommitdiff
path: root/vimrc
blob: 7ea450aabf60334a7337fedbf81adb8ef0d11208 (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
65
66
67
68
69
70
71
72
73

set shell=/bin/zsh

set t_Co=256
colorscheme cobalt2
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 background=dark

" allow backspacing over everything in insert mode
set nocompatible
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:\|\ 
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab

" latex settings
let g:vimtex_view_method = 'zathura'

" 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

autocmd BufNewFile,BufRead *.wl set syntax=wl
autocmd BufNewFile,BufRead *.wls set syntax=wl
autocmd BufNewFile,BufRead *.m set syntax=wl

" use <tab> for trigger completion and navigate to the next complete item
function! s:check_back_space() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~ '\s'
endfunction

inoremap <silent><expr> <Tab>
      \ pumvisible() ? "\<C-n>" :
      \ <SID>check_back_space() ? "\<Tab>" :
      \ coc#refresh()

inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"

call plug#begin()

Plug 'lervag/vimtex'
Plug 'rhysd/vim-clang-format'
Plug 'neovimhaskell/haskell-vim'
Plug 'alx741/vim-hindent' 
Plug 'tpope/vim-fugitive'
Plug 'neoclide/coc.nvim'
Plug 'voldikss/vim-mma'

call plug#end()