Compare commits
3 Commits
9960006656
...
152cbf5e64
Author | SHA1 | Date | |
---|---|---|---|
152cbf5e64 | |||
43e7b9dec2 | |||
7f273240e3 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ local.vim
|
||||
.netrwhist
|
||||
pack/*
|
||||
spell/*
|
||||
*.pyc
|
||||
|
@ -9,8 +9,6 @@ setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
|
||||
setlocal commentstring=//%s
|
||||
" Stop automatic new lines which typing long single liners.
|
||||
setlocal textwidth=0
|
||||
" Map K to get YouCompleteMe documentation.
|
||||
nnoremap K :YcmCompleter GetDoc<CR>
|
||||
" "ys{motion}t" turns "word" -> "TODO(word):"
|
||||
let b:surround_{char2nr("t")} = "TODO(\r):"
|
||||
" "ys{motion}/" turns "text" into "/*text*/"
|
||||
|
@ -1,10 +1,10 @@
|
||||
" coc.nvim
|
||||
nnoremap <silent> <leader>fi <Plug>(coc-fix-current)
|
||||
nnoremap <silent> <leader>gd <Plug>(coc-definition)
|
||||
nnoremap <silent> <leader>gt <Plug>(coc-type-definition)
|
||||
nnoremap <silent> <leader>sd <Plug>(coc-diagnostic-info)
|
||||
nnoremap <silent> <leader>gr <Plug>(coc-references)
|
||||
nnoremap <silent> K :call do#show_documentation()<CR>
|
||||
nmap <silent> <leader>fi <Plug>(coc-fix-current)
|
||||
nmap <silent> <leader>gd <Plug>(coc-definition)
|
||||
nmap <silent> <leader>gt <Plug>(coc-type-definition)
|
||||
nmap <silent> <leader>sd <Plug>(coc-diagnostic-info)
|
||||
nmap <silent> <leader>gr <Plug>(coc-references)
|
||||
nmap <silent> K :call do#show_documentation()<CR>
|
||||
|
||||
if has('nvim')
|
||||
" Make nvim :terminal more like vim :terminal
|
||||
|
@ -1,4 +1,5 @@
|
||||
" Show the statusline above the commandline.
|
||||
scriptencoding utf-8
|
||||
set laststatus=2
|
||||
|
||||
" Define color variables.
|
||||
@ -6,10 +7,11 @@ let g:statusline#light_green = {'fg': ['235', '#080808'], 'bg': [ '35', '#0087f
|
||||
let g:statusline#light_blue = {'fg': ['235', '#080808'], 'bg': [ '33', '#0087ff']}
|
||||
let g:statusline#light_orange = {'fg': ['235', '#080808'], 'bg': ['209', '#eb754d']}
|
||||
let g:statusline#light_red = {'fg': ['235', '#080808'], 'bg': ['124', '#af0000']}
|
||||
let g:statusline#light_grey = {'fg': ['250', "#bcbcbc"], 'bg': ['236', "#303030"]}
|
||||
let g:statusline#light_grey = {'fg': ['250', '#bcbcbc'], 'bg': ['236', '#303030']}
|
||||
let g:statusline#light_violet = {'fg': ['235', '#080808'], 'bg': [ '99', '#986fec']}
|
||||
let g:statusline#dark_white = {'fg': [ '15', '#ffffff'], 'bg': ['233', '#121212']}
|
||||
let g:statusline#dark_yellow = {'fg': ['179', '#dfaf5f'], 'bg': ['233', '#121212']}
|
||||
let g:statusline#dark_grey = {'fg': ['244', '#808080'], 'bg': ['233', '#121212']}
|
||||
|
||||
" Create highlight groups.
|
||||
function! s:hi(group, color) abort
|
||||
@ -27,9 +29,12 @@ call s:hi('StatusLineDusk', g:statusline#light_grey)
|
||||
" StatusLineDark shows the filename and filetype and takes up most of the
|
||||
" statusline, give it a dark background.
|
||||
call s:hi('StatusLineDark', g:statusline#dark_white)
|
||||
" StatusLineChange show changes in the file by changing the colour of the
|
||||
" StatusLineChange shows changes in the file by changing the colour of the
|
||||
" filename, give if a dark background.
|
||||
call s:hi('StatusLineChange', g:statusline#dark_yellow)
|
||||
" StatusLineFade shows the status of completion engines but using colors which
|
||||
" fade into the background to avoid grabbing attention.
|
||||
call s:hi('StatusLineDuskFade', g:statusline#dark_grey)
|
||||
|
||||
" Construct a statusline for special buffer types.
|
||||
function! statusline#special(group, name, title)
|
||||
@ -59,6 +64,8 @@ function! statusline#generic(group, mode)
|
||||
let l:state = '%#StatusLineDark#'
|
||||
\.'%{&readonly ? " 🔒" : ""}'
|
||||
\.'%{&modifiable ? "" : " ⛔"}'
|
||||
" Display coc.nvim status.
|
||||
let l:coc = '%#StatusLineDuskFade#%( %{coc#status()}%)'
|
||||
" Display filetype if set.
|
||||
let l:type = '%#StatusLineDark# %{&filetype} '
|
||||
" Display fileencoding if not utf-8 and fileformat if not unix with dusk
|
||||
@ -70,7 +77,7 @@ function! statusline#generic(group, mode)
|
||||
" Display current/total lines and column with dynamic highlights.
|
||||
let l:line = '%#'.a:group.'# ☰ %l/%L ㏑%2c '
|
||||
" Combine the elements into a single string to be evaluated.
|
||||
return l:mode.l:edit.l:file.l:state.'%='.l:type.l:format.l:line
|
||||
return l:mode.l:edit.l:file.l:state.l:coc.'%='.l:type.l:format.l:line
|
||||
endfunction
|
||||
|
||||
" Define active statusline, this statusline is dynamic with StatusLineLight
|
||||
|
Loading…
x
Reference in New Issue
Block a user