aboutsummaryrefslogtreecommitdiff
path: root/vim/.vimrc
blob: 3130da0d3b8e8fc43cd2cc6c7def510dc265dd5a (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
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
set nocompatible
let g:gruvbox_contrast_dark = 'soft'
let g:gruvbox_termcolors = '16'
colorscheme gruvbox
set ttymouse=sgr
set number
set bg:dark
set mouse=a
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
set linebreak
set cursorline
set backspace=indent,eol,start
set laststatus=2
set wildmenu
set scrolloff=5
set incsearch
set ttimeout ttimeoutlen=25
set clipboard=unnamedplus

" turn on spell checker for all markdown files
autocmd FileType markdown setlocal spell

execute pathogen#infect()

call plug#begin()

Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'jaxbot/semantic-highlight.vim'

call plug#end()

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

function! s:check_back_space() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~# '\s'
endfunction

let s:semanticGUIColors = [ "#cc241d", "#98971a", "#d79921", "#458588", "#b16286", "#689d6a", "#928374", "#fb4934", "#b8bb26", "#fabd2f", "#83a598", "#d3869b", "#8ec07c", "#ebdbb2" ]


" stolen from https://shapeshed.com/vim-statuslines/
"function! GitBranch()
"  return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
"  let g:gitparsedbranchname = strlen(l:string) > 0?'['.l:string.']':''
"endfunction

"function! StatuslineGit()
"  let l:branchname = GitBranch()
"  return strlen(l:branchname) > 0?'  '.l:branchname.' ':''
"endfunction

"function! InsertStatuslineColor(mode)
"  if a:mode == 'i'
"    hi statusline guibg=Cyan ctermfg=6 guifg=Black ctermbg=0
"  elseif a:mode == 'r'
"    hi statusline guibg=Purple ctermfg=5 guifg=Black ctermbg=0
"  else
"    hi statusline guibg=DarkRed ctermfg=1 guifg=Black ctermbg=0
"  endif
"endfunction

"au InsertEnter * call InsertStatuslineColor(v:insertmode)
"au InsertLeave * hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15

set statusline=
"set statusline+=%#PmenuSel#
"set statusline+=%{StatuslineGit()}
"set statusline+=%#LineNr#
set statusline+=\ %F
set statusline+=\ %y
set statusline+=\ %m
set statusline+=\ %r
set statusline+=%=
set statusline+=%#CursorColumn#
"set statusline+=\ %L\ lines 
"set statusline+=\ %y
"set statusline+=\
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
"set statusline+=" >"
set statusline+=\ [%{&fileformat}\]
"set statusline+=" >"
set statusline+=\ %p%%
"set statusline+=" >"
set statusline+=\ %l/%L:%c
set statusline+=\ 


"hi StatusLine ctermbg=black
hi Normal ctermbg=NONE
let g:lightline = {
  \ 'colorscheme': 'gruvbox',
  \ 'active': {
  \   'left': [ [ 'mode', 'paste' ],
  \             [ 'filename', 'readonly', 'modified' ] ],
  \   'right':  [ [ 'lineinfo' ],
  \               [ 'fileformat', 'fileencoding', 'filetype' ] ]
  \ }, 
  \ 'component_function': {
  \   'cocstatus': 'coc#status',
  \   'currentfunction': 'CocCurrentFunction'
  \ },
  \ }
set noshowmode