mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-23 20:14:11 -05:00
Compare commits
No commits in common. "44075669be96bf69db93884aff064c0da8c2595b" and "432d4768db4ec70cd0d3ed7e22c324f7be379375" have entirely different histories.
44075669be
...
432d4768db
10 changed files with 111 additions and 127 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -22,12 +22,18 @@
|
||||||
[submodule "vim/bundle/vim-signify"]
|
[submodule "vim/bundle/vim-signify"]
|
||||||
path = vim/bundle/vim-signify
|
path = vim/bundle/vim-signify
|
||||||
url = https://github.com/mhinz/vim-signify
|
url = https://github.com/mhinz/vim-signify
|
||||||
|
[submodule "vim/bundle/vim-repeat"]
|
||||||
|
path = vim/bundle/vim-repeat
|
||||||
|
url = https://github.com/tpope/vim-repeat.git
|
||||||
[submodule "vim/bundle/vim-polyglot-darkcloud"]
|
[submodule "vim/bundle/vim-polyglot-darkcloud"]
|
||||||
path = vim/bundle/vim-polyglot-darkcloud
|
path = vim/bundle/vim-polyglot-darkcloud
|
||||||
url = https://github.com/prurigro/vim-polyglot-darkcloud.git
|
url = https://github.com/prurigro/vim-polyglot-darkcloud.git
|
||||||
[submodule "vim/bundle/tabular"]
|
[submodule "vim/bundle/tabular"]
|
||||||
path = vim/bundle/tabular
|
path = vim/bundle/tabular
|
||||||
url = https://github.com/godlygeek/tabular
|
url = https://github.com/godlygeek/tabular
|
||||||
|
[submodule "vim/bundle/vim-unimpaired"]
|
||||||
|
path = vim/bundle/vim-unimpaired
|
||||||
|
url = https://github.com/tpope/vim-unimpaired.git
|
||||||
[submodule "vim/bundle/ReplaceWithRegister"]
|
[submodule "vim/bundle/ReplaceWithRegister"]
|
||||||
path = vim/bundle/ReplaceWithRegister
|
path = vim/bundle/ReplaceWithRegister
|
||||||
url = https://github.com/prurigro/ReplaceWithRegister.git
|
url = https://github.com/prurigro/ReplaceWithRegister.git
|
||||||
|
|
|
@ -85,6 +85,7 @@ A theme, config and collection of plugins for Neovim
|
||||||
| F4 | ALL | Toggle source code syntax checking |
|
| F4 | ALL | Toggle source code syntax checking |
|
||||||
| | | |
|
| | | |
|
||||||
| \` | N | Toggle gutter (left bar with line numbers etc.) |
|
| \` | N | Toggle gutter (left bar with line numbers etc.) |
|
||||||
|
| Leader+? | N | Toggle the **vim** reference manual |
|
||||||
|
|
||||||
#### Spell Check
|
#### Spell Check
|
||||||
|
|
||||||
|
@ -143,6 +144,8 @@ For a complete list of mappings specific to **darkcloud-nvimconfig**, check the
|
||||||
* [vim-signify](https://github.com/mhinz/vim-signify): When a version controlled file is changed, this displays a column showing where and how, and allows for navigation to and between differences
|
* [vim-signify](https://github.com/mhinz/vim-signify): When a version controlled file is changed, this displays a column showing where and how, and allows for navigation to and between differences
|
||||||
* [vim-togglelist](https://github.com/milkypostman/vim-togglelist): A simple plugin for vim that allows you to bind a key to toggle the Location List and the Quickfix List
|
* [vim-togglelist](https://github.com/milkypostman/vim-togglelist): A simple plugin for vim that allows you to bind a key to toggle the Location List and the Quickfix List
|
||||||
* [vim-trailing-whitespace](https://github.com/bronson/vim-trailing-whitespace): Highlights and allows for the easy removal of trailing whitespace in documents
|
* [vim-trailing-whitespace](https://github.com/bronson/vim-trailing-whitespace): Highlights and allows for the easy removal of trailing whitespace in documents
|
||||||
|
* [vim-unimpaired](https://github.com/tpope/vim-unimpaired): Pairs of handy bracket mappings
|
||||||
|
* [vim-repeat](https://github.com/tpope/vim-repeat): Enable repeating supported plugin maps with "."
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|
2
update
2
update
|
@ -216,7 +216,7 @@ fi
|
||||||
[[ -f "$plugin/.git" ]] && {
|
[[ -f "$plugin/.git" ]] && {
|
||||||
plugin_dirname="${plugin/*\/}"
|
plugin_dirname="${plugin/*\/}"
|
||||||
|
|
||||||
grep 'path = ' .gitmodules | grep -oe '[^\/]*$' | grep -qe "^$plugin_dirname$" || {
|
grep 'path = ' .gitmodules | grep -oe '[^\/]*$' | grep -qe "$plugin_dirname$" || {
|
||||||
[[ -z "$first_found" ]] && {
|
[[ -z "$first_found" ]] && {
|
||||||
first_found=1
|
first_found=1
|
||||||
printf '%s\n' "$cbg_blue $c_reset$cbg_yellow + Removing old plugins: $c_reset"
|
printf '%s\n' "$cbg_blue $c_reset$cbg_yellow + Removing old plugins: $c_reset"
|
||||||
|
|
1
vim/bundle/vim-repeat
Submodule
1
vim/bundle/vim-repeat
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 24afe922e6a05891756ecf331f39a1f6743d3d5a
|
1
vim/bundle/vim-unimpaired
Submodule
1
vim/bundle/vim-unimpaired
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 6d44a6dc2ec34607c41ec78acf81657248580bf1
|
|
@ -19,7 +19,7 @@ endif
|
||||||
"declare the name of our theme
|
"declare the name of our theme
|
||||||
let colors_name = "darkcloud"
|
let colors_name = "darkcloud"
|
||||||
|
|
||||||
"sets the highlighting for the given group | format: s:C("Name","Foreground","Background","Style")
|
"sets the highlighting for the given group | format: s:C('Name','Foreground','Background','Style')
|
||||||
fun! s:C(group, fg, bg, attr)
|
fun! s:C(group, fg, bg, attr)
|
||||||
if has("gui_running") || &termguicolors
|
if has("gui_running") || &termguicolors
|
||||||
let l:term = "gui"
|
let l:term = "gui"
|
||||||
|
@ -59,23 +59,20 @@ endfun
|
||||||
call s:C("Normal",g:cWhite,g:cDarkBg,"")
|
call s:C("Normal",g:cWhite,g:cDarkBg,"")
|
||||||
hi! link Conceal Normal
|
hi! link Conceal Normal
|
||||||
|
|
||||||
"cursor
|
|
||||||
call s:C("Cursor","",g:cDarkBg,"standout")
|
call s:C("Cursor","",g:cDarkBg,"standout")
|
||||||
call s:C("CursorColumn","",g:cLightBg,"")
|
call s:C("CursorColumn","",g:cLightBg,"")
|
||||||
call s:C("CursorLine","",g:cLightBg,"")
|
call s:C("CursorLine","",g:cLightBg,"")
|
||||||
call s:C("CursorLineNr",g:cBlue,g:cLightBg,"bold")
|
call s:C("CursorLineNr",g:cBlue,g:cLightBg,"bold")
|
||||||
call s:C("LineNr",g:cGray4,"","bold")
|
call s:C("LineNr",g:cGray4,"","bold")
|
||||||
|
|
||||||
"selected text
|
|
||||||
call s:C("Visual","",g:cDarkBg,"standout")
|
call s:C("Visual","",g:cDarkBg,"standout")
|
||||||
|
|
||||||
"vertical split divider
|
|
||||||
call s:C("VertSplit",g:cGray1,"","")
|
call s:C("VertSplit",g:cGray1,"","")
|
||||||
|
call s:C("MatchParen","",g:cLightBg,"bold")
|
||||||
"matched parenthesis
|
|
||||||
call s:C("MatchParen",g:cWhite,g:cLightBg,"bold")
|
|
||||||
|
|
||||||
"whitespace
|
"whitespace
|
||||||
|
call s:C("TabLine","",g:cBlack,"")
|
||||||
|
call s:C("TabLineFill","",g:cBlack,"")
|
||||||
|
call s:C("TabLineSel",g:cBlack,g:cGray1,"")
|
||||||
call s:C("ExtraWhiteSpace",g:cDarkRed,g:cDarkBg,"")
|
call s:C("ExtraWhiteSpace",g:cDarkRed,g:cDarkBg,"")
|
||||||
|
|
||||||
"menu call
|
"menu call
|
||||||
|
@ -281,7 +278,7 @@ endfun
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"TREESITTER: {{{
|
"TREESITTER: {{{
|
||||||
if has("nvim")
|
if has('nvim')
|
||||||
call s:C("@attribute",g:cRed,"","")
|
call s:C("@attribute",g:cRed,"","")
|
||||||
call s:C("@boolean",g:cYellow,"","bold")
|
call s:C("@boolean",g:cYellow,"","bold")
|
||||||
call s:C("@character",g:cWhite,"","bold")
|
call s:C("@character",g:cWhite,"","bold")
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
if has("gui_running") || &termguicolors
|
if has("gui_running") || &termguicolors
|
||||||
let g:cBlack = '#000000'
|
let g:cBlack = '#000000'
|
||||||
let g:cWhite = '#ffffff'
|
let g:cWhite = '#ffffff'
|
||||||
|
'
|
||||||
let g:cGray1 = '#dadada'
|
let g:cGray1 = '#dadada'
|
||||||
let g:cGray2 = '#c6c6c6'
|
let g:cGray2 = '#c6c6c6'
|
||||||
let g:cGray3 = '#6c6c6c'
|
let g:cGray3 = '#6c6c6c'
|
||||||
let g:cGray4 = '#4e4e4e'
|
let g:cGray4 = '#4e4e4e'
|
||||||
|
'
|
||||||
let g:cBlue = '#87d7ff'
|
let g:cBlue = '#87d7ff'
|
||||||
let g:cRed = '#d75f5f'
|
let g:cRed = '#d75f5f'
|
||||||
let g:cYellow = '#ffd787'
|
let g:cYellow = '#ffd787'
|
||||||
|
'
|
||||||
let g:cDarkBlue = '#5fafd7'
|
let g:cDarkBlue = '#5fafd7'
|
||||||
let g:cDarkRed = '#af5f5f'
|
let g:cDarkRed = '#af5f5f'
|
||||||
let g:cDarkYellow = '#d7af5f'
|
let g:cDarkYellow = '#d7af5f'
|
||||||
|
'
|
||||||
let g:cLightBg = '#303030'
|
let g:cLightBg = '#303030'
|
||||||
let g:cDarkBg = '#262626'
|
let g:cDarkBg = '#262626'
|
||||||
elseif &t_Co >= 256
|
elseif &t_Co >= 256
|
||||||
|
|
|
@ -54,9 +54,9 @@
|
||||||
" <Esc> | (T) -> leave edit mode
|
" <Esc> | (T) -> leave edit mode
|
||||||
"
|
"
|
||||||
" (tabs)
|
" (tabs)
|
||||||
" <Ctrl-n> | (N) -> go to the next open tab
|
" <Alt-n> | (N) -> go to the next open tab
|
||||||
" <Ctrl-p> | (N) -> go to the previous open tab
|
" <Alt-p> | (N) -> go to the previous open tab
|
||||||
" <Ctrl-t> | (N) -> open a new tab
|
" <Alt-t> | (N) -> open a new tab
|
||||||
"
|
"
|
||||||
" (split)
|
" (split)
|
||||||
" <Ctrl-w>{ | (N) -> rotate counter-clockwise
|
" <Ctrl-w>{ | (N) -> rotate counter-clockwise
|
||||||
|
@ -77,13 +77,12 @@
|
||||||
" # | (N) -> center vertically on nth last search term
|
" # | (N) -> center vertically on nth last search term
|
||||||
"
|
"
|
||||||
" (toggles and features)
|
" (toggles and features)
|
||||||
" <Leader>d | (N) -> VCS vimdiff in a new tab with signify
|
|
||||||
"
|
|
||||||
" ik | (N) -> add cursor character as a keyword
|
" ik | (N) -> add cursor character as a keyword
|
||||||
" iK | (N) -> remove cursor character as a keyword
|
" iK | (N) -> remove cursor character as a keyword
|
||||||
"
|
"
|
||||||
" ~ | (N) -> popup a command reference
|
" ~ | (N) -> popup a command reference
|
||||||
" <Leader><F1> | (N) -> toggle the vim reference manual
|
" <Leader><F1> | (N) -> toggle the vim reference manual
|
||||||
|
" <Leader>? | (N) -> toggle the vim reference manual
|
||||||
" ` | (A) -> toggle the gutter(numbers+folds+signify)
|
" ` | (A) -> toggle the gutter(numbers+folds+signify)
|
||||||
"
|
"
|
||||||
" <Space><Space> | (N) -> toggle selected fold
|
" <Space><Space> | (N) -> toggle selected fold
|
||||||
|
@ -133,10 +132,12 @@
|
||||||
" <Leader>w | (N) -> remove whitespace
|
" <Leader>w | (N) -> remove whitespace
|
||||||
" <Tab> | (V) -> indent all the lines currently selected
|
" <Tab> | (V) -> indent all the lines currently selected
|
||||||
" <Tab> | (N) -> indent the current line
|
" <Tab> | (N) -> indent the current line
|
||||||
|
" <Leader>> | (V) -> indent all the lines currently selected
|
||||||
|
" <Leader>> | (N) -> indent the current line
|
||||||
" <Shift-Tab> | (V) -> un-indent all the lines currently selected
|
" <Shift-Tab> | (V) -> un-indent all the lines currently selected
|
||||||
" <Shift-Tab> | (N) -> un-indent the current line
|
" <Shift-Tab> | (N) -> un-indent the current line
|
||||||
" [<Space> | (N) -> insert a blank line above the current one
|
" <Leader>< | (V) -> un-indent all the lines currently selected
|
||||||
" ]<Space> | (N) -> insert a blank line below the current one
|
" <Leader>< | (N) -> un-indent the current line
|
||||||
"
|
"
|
||||||
" (macros)
|
" (macros)
|
||||||
" ' | (N) -> run a macro
|
" ' | (N) -> run a macro
|
||||||
|
@ -187,6 +188,9 @@
|
||||||
"Filetype Specific Mappings:
|
"Filetype Specific Mappings:
|
||||||
" (help)
|
" (help)
|
||||||
" q | (A) -> close the dialog
|
" q | (A) -> close the dialog
|
||||||
|
" <Leader>? | (A) -> close the dialog
|
||||||
|
" ?> | (A) -> close the dialog
|
||||||
|
" ?< | (A) -> close the dialog
|
||||||
"
|
"
|
||||||
" (error/location list)
|
" (error/location list)
|
||||||
" <Left> | (A) -> up
|
" <Left> | (A) -> up
|
||||||
|
@ -213,7 +217,8 @@
|
||||||
noremap > <Nop>
|
noremap > <Nop>
|
||||||
noremap < <Nop>
|
noremap < <Nop>
|
||||||
|
|
||||||
"-unmapping help from F1, Alt-F1 and Ctrl-F1
|
"-unmapping help from F1 and Ctrl-F1 for use toggling the reference manual
|
||||||
|
"+the :h topic feature works, and <Leader>? displays quickref
|
||||||
map <F1> <Nop>
|
map <F1> <Nop>
|
||||||
map <A-F1> <Nop>
|
map <A-F1> <Nop>
|
||||||
map <C-F1> <Nop>
|
map <C-F1> <Nop>
|
||||||
|
@ -370,9 +375,9 @@
|
||||||
"}
|
"}
|
||||||
|
|
||||||
"TABS:{
|
"TABS:{
|
||||||
nnoremap <silent><expr> <C-n> ':tabnext<CR>'
|
nnoremap <silent><expr> <A-n> ':tabnext<CR>'
|
||||||
nnoremap <silent><expr> <C-p> ':tabprev<CR>'
|
nnoremap <silent><expr> <A-p> ':tabprev<CR>'
|
||||||
nnoremap <silent><expr> <C-t> ':tabnew<CR>'
|
nnoremap <silent><expr> <A-t> ':tabnew<CR>'
|
||||||
"}
|
"}
|
||||||
|
|
||||||
"SPLIT:{
|
"SPLIT:{
|
||||||
|
@ -399,9 +404,6 @@
|
||||||
"}
|
"}
|
||||||
|
|
||||||
"TOGGLES AND FEATURES:{
|
"TOGGLES AND FEATURES:{
|
||||||
"VCS vimdiff in a new tab with signify
|
|
||||||
nnoremap <silent><expr> <Leader>d ':SignifyDiff<CR>'
|
|
||||||
|
|
||||||
"add/remove cursor character as a keyword
|
"add/remove cursor character as a keyword
|
||||||
nmap <expr><silent> <Leader>k ':execute "setlocal iskeyword+=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been added to iskeyword"<CR>'
|
nmap <expr><silent> <Leader>k ':execute "setlocal iskeyword+=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been added to iskeyword"<CR>'
|
||||||
nmap <expr><silent> <Leader>K ':execute "setlocal iskeyword-=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been removed from iskeyword"<CR>'
|
nmap <expr><silent> <Leader>K ':execute "setlocal iskeyword-=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been removed from iskeyword"<CR>'
|
||||||
|
@ -409,6 +411,9 @@
|
||||||
"toggle the command reference box
|
"toggle the command reference box
|
||||||
nnoremap <silent><expr> ~ ':TCommand<CR>'
|
nnoremap <silent><expr> ~ ':TCommand<CR>'
|
||||||
|
|
||||||
|
"toggle the vim reference manual
|
||||||
|
nnoremap <silent><expr> <Leader>? ':h index.txt<CR>'
|
||||||
|
|
||||||
"toggle the display of the left gutter
|
"toggle the display of the left gutter
|
||||||
nnoremap <silent><expr> ` ':if (&number)<Bar>set nonumber<Bar>if exists("b:sy")<Bar>SignifyDisable<Bar>endif<Bar>else<Bar>set number<Bar>if exists("b:sy")<Bar>SignifyEnable<Bar>endif<Bar>endif<CR>:echo "gutter visibility toggled"<CR>'
|
nnoremap <silent><expr> ` ':if (&number)<Bar>set nonumber<Bar>if exists("b:sy")<Bar>SignifyDisable<Bar>endif<Bar>else<Bar>set number<Bar>if exists("b:sy")<Bar>SignifyEnable<Bar>endif<Bar>endif<CR>:echo "gutter visibility toggled"<CR>'
|
||||||
|
|
||||||
|
@ -511,15 +516,15 @@
|
||||||
"remove trailing whitespace
|
"remove trailing whitespace
|
||||||
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
||||||
|
|
||||||
"tab and untab the currently selected lines
|
"tab/<Leader>> and untab/<Leader>< the currently selected lines
|
||||||
vnoremap <Tab> >gv
|
vnoremap <Tab> >gv
|
||||||
nnoremap <Tab> v>gv<Esc>
|
nnoremap <Tab> v>gv<Esc>
|
||||||
|
vnoremap <Leader>> >gv
|
||||||
|
nnoremap <Leader>> v>gv<Esc>
|
||||||
vnoremap <S-Tab> <gv
|
vnoremap <S-Tab> <gv
|
||||||
nnoremap <S-Tab> v<gv<Esc>
|
nnoremap <S-Tab> v<gv<Esc>
|
||||||
|
vnoremap <Leader>< <gv
|
||||||
"insert blank lines above and below the current one
|
nnoremap <Leader>< v<gv<Esc>
|
||||||
nnoremap <silent> ]<Space> :<C-u>call append(line("."), repeat([""], v:count1))<CR>
|
|
||||||
nnoremap <silent> [<Space> :<C-u>call append(line(".")-1, repeat([""], v:count1))<CR>
|
|
||||||
"}
|
"}
|
||||||
|
|
||||||
"MACROS:{
|
"MACROS:{
|
||||||
|
@ -604,6 +609,8 @@
|
||||||
"help
|
"help
|
||||||
if !&diff
|
if !&diff
|
||||||
autocmd FileType help map <buffer> <silent><expr> q ':q<CR>'
|
autocmd FileType help map <buffer> <silent><expr> q ':q<CR>'
|
||||||
|
autocmd FileType help map <buffer> <silent><expr> <Leader><F1> ':q<CR>'
|
||||||
|
autocmd FileType help map <buffer> <silent><expr> <Leader>? ':q<CR>'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"error/location list
|
"error/location list
|
||||||
|
|
|
@ -1,94 +1,89 @@
|
||||||
function! LLModified()
|
function! LLModified()
|
||||||
return &ft =~ "help" ? "" : &modified ? "*" : &modifiable ? "" : "-"
|
return &ft =~ 'help' ? '' : &modified ? '*' : &modifiable ? '' : '-'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLReadonly()
|
function! LLReadonly()
|
||||||
return &ft !~? "help" && &readonly ? "[RO]" : ""
|
return &ft !~? 'help' && &readonly ? '[RO]' : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFilename()
|
function! LLFilename()
|
||||||
let fname = expand("%:t")
|
let fname = expand('%:t')
|
||||||
|
|
||||||
return
|
return
|
||||||
\ fname == "__Tagbar__.1" ? g:lightline.fname :
|
\ fname == '__Tagbar__.1' ? g:lightline.fname :
|
||||||
\ &ft == "qf" ? "[Error/Location List]" :
|
\ &ft == 'qf' ? '[Error/Location List]' :
|
||||||
\ ("" != LLReadonly() ? LLReadonly() . " " : "") .
|
\ ('' != LLReadonly() ? LLReadonly() . ' ' : '') .
|
||||||
\ ("" != fname ? fname : "[NEW]") .
|
\ ('' != fname ? fname : '[NEW]') .
|
||||||
\ ("" != LLModified() ? " " . LLModified() : "")
|
\ ('' != LLModified() ? ' ' . LLModified() : '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFugitive()
|
function! LLFugitive()
|
||||||
if expand("%:t") !~? "Tagbar" && exists("*FugitiveHead")
|
if expand('%:t') !~? 'Tagbar' && exists('*FugitiveHead')
|
||||||
let mark = ""
|
let mark = '' "edit here for cool mark
|
||||||
let _ = FugitiveHead()
|
let _ = FugitiveHead()
|
||||||
return strlen(_) ? mark._ : ""
|
return strlen(_) ? mark._ : ''
|
||||||
else
|
else
|
||||||
return ""
|
return ''
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFileformat()
|
function! LLFileformat()
|
||||||
return winwidth(0) > 70 ? &fileformat : ""
|
return winwidth(0) > 70 ? &fileformat : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFiletype()
|
function! LLFiletype()
|
||||||
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : "none") : ""
|
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'none') : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFileencoding()
|
function! LLFileencoding()
|
||||||
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ""
|
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLMode()
|
function! LLMode()
|
||||||
let fname = expand("%:t")
|
let fname = expand('%:t')
|
||||||
|
|
||||||
return fname == "__Tagbar__" ? "Tagbar" :
|
return fname == '__Tagbar__' ? 'Tagbar' :
|
||||||
\ winwidth(0) > 60 ? lightline#mode() : ""
|
\ winwidth(0) > 60 ? lightline#mode() : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let g:tagbar_status_func = "TagbarStatusFunc"
|
let g:tagbar_status_func = 'TagbarStatusFunc'
|
||||||
|
|
||||||
function! TagbarStatusFunc(current, sort, fname, ...) abort
|
function! TagbarStatusFunc(current, sort, fname, ...) abort
|
||||||
let g:lightline.fname = "tags"
|
let g:lightline.fname = 'tags'
|
||||||
return lightline#statusline(0)
|
return lightline#statusline(0)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ "enable": {
|
\ 'component_function': {
|
||||||
\ "statusline": 1,
|
\ 'fugitive': 'LLFugitive',
|
||||||
\ "tabline": 1
|
\ 'filename': 'LLFilename',
|
||||||
|
\ 'fileformat': 'LLFileformat',
|
||||||
|
\ 'filetype': 'LLFiletype',
|
||||||
|
\ 'fileencoding': 'LLFileencoding',
|
||||||
|
\ 'mode': 'LLMode'
|
||||||
\ },
|
\ },
|
||||||
\
|
\
|
||||||
\ "component_function": {
|
\ 'component_expand': {
|
||||||
\ "fugitive": "LLFugitive",
|
\ 'linter_checking': 'lightline#ale#checking',
|
||||||
\ "filename": "LLFilename",
|
\ 'linter_warnings': 'lightline#ale#warnings',
|
||||||
\ "fileformat": "LLFileformat",
|
\ 'linter_errors': 'lightline#ale#errors',
|
||||||
\ "filetype": "LLFiletype",
|
\ 'linter_ok': 'lightline#ale#ok'
|
||||||
\ "fileencoding": "LLFileencoding",
|
|
||||||
\ "mode": "LLMode"
|
|
||||||
\ },
|
\ },
|
||||||
\
|
\
|
||||||
\ "component_expand": {
|
\ 'component_type': {
|
||||||
\ "linter_checking": "lightline#ale#checking",
|
\ 'linter_checking': 'left',
|
||||||
\ "linter_warnings": "lightline#ale#warnings",
|
\ 'linter_warnings': 'warning',
|
||||||
\ "linter_errors": "lightline#ale#errors",
|
\ 'linter_errors': 'error',
|
||||||
\ "linter_ok": "lightline#ale#ok"
|
\ 'linter_ok': 'left'
|
||||||
\ },
|
\ },
|
||||||
\
|
\
|
||||||
\ "component_type": {
|
\ 'component': {
|
||||||
\ "linter_checking": "left",
|
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}'
|
||||||
\ "linter_warnings": "warning",
|
|
||||||
\ "linter_errors": "error",
|
|
||||||
\ "linter_ok": "left"
|
|
||||||
\ },
|
\ },
|
||||||
\
|
\
|
||||||
\ "component": {
|
\ 'active': {
|
||||||
\ "tagbar": "%{tagbar#currenttag('[%s]', '', 'f')}"
|
\ 'left': [[ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ]],
|
||||||
\ },
|
\ 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ], [ 'fileformat', 'fileencoding', 'filetype' ], [ 'percent', 'lineinfo' ]]
|
||||||
\
|
|
||||||
\ "active": {
|
|
||||||
\ "left": [[ "mode", "paste" ], [ "fugitive", "filename" ], [ "tagbar" ]],
|
|
||||||
\ "right": [[ "linter_checking", "linter_errors", "linter_warnings", "linter_ok" ], [ "fileformat", "fileencoding", "filetype" ], [ "percent", "lineinfo" ]]
|
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
@ -98,20 +93,23 @@ let g:lightline#ale#indicator_errors = "E:"
|
||||||
let g:lightline#ale#indicator_ok = "OK"
|
let g:lightline#ale#indicator_ok = "OK"
|
||||||
|
|
||||||
"status bar config with and without powerline fonts (default: 0)
|
"status bar config with and without powerline fonts (default: 0)
|
||||||
|
if !exists("g:enablepowerline")
|
||||||
|
let g:enablepowerline = 0
|
||||||
|
endif
|
||||||
|
|
||||||
if (g:enablepowerline == 1)
|
if (g:enablepowerline == 1)
|
||||||
let g:lightline.separator = { "left": "", "right": "" }
|
let g:lightline.separator = { 'left': '', 'right': '' }
|
||||||
let g:lightline.subseparator = { "left": "", "right": "" }
|
let g:lightline.subseparator = { 'left': '', 'right': '' }
|
||||||
else
|
else
|
||||||
let g:lightline.separator = { "left": "", "right": "" }
|
let g:lightline.separator = { 'left': '', 'right': '' }
|
||||||
let g:lightline.subseparator = { "left": "|", "right": "|" }
|
let g:lightline.subseparator = { 'left': '|', 'right': '|' }
|
||||||
let g:lightline.tabline_subseparator = { "left": "", "right": "" }
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"ligtline theme {{{
|
"ligtline theme {{{
|
||||||
let s:p = { "normal": {}, "inactive": {}, "insert": {}, "replace": {}, "visual": {}, "tabline": {} }
|
let s:p = { 'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {} }
|
||||||
|
|
||||||
if &term != "linux"
|
if &term != "linux"
|
||||||
let g:lightline.colorscheme = "darkcloud"
|
let g:lightline.colorscheme = 'darkcloud'
|
||||||
|
|
||||||
let s:p.normal.left = [[ g:cBlue, g:cDarkBg ], [ g:cWhite, g:cLightBg ]]
|
let s:p.normal.left = [[ g:cBlue, g:cDarkBg ], [ g:cWhite, g:cLightBg ]]
|
||||||
let s:p.inactive.left = [[ g:cGray3, g:cDarkBg ], [ g:cGray3, g:cLightBg ]]
|
let s:p.inactive.left = [[ g:cGray3, g:cDarkBg ], [ g:cGray3, g:cLightBg ]]
|
||||||
|
@ -123,14 +121,13 @@ endif
|
||||||
let s:p.visual.left = [[ g:cYellow, g:cLightBg ], [ g:cWhite, g:cDarkBg ]]
|
let s:p.visual.left = [[ g:cYellow, g:cLightBg ], [ g:cWhite, g:cDarkBg ]]
|
||||||
|
|
||||||
let s:p.normal.middle = [[ g:cWhite, g:cLightBg ]]
|
let s:p.normal.middle = [[ g:cWhite, g:cLightBg ]]
|
||||||
|
let s:p.tabline.left = [[ g:cWhite, g:cDarkBg ]]
|
||||||
|
let s:p.tabline.tabsel = [[ g:cWhite, g:cLightBg ]]
|
||||||
|
let s:p.tabline.middle = [[ g:cDarkBg, g:cGray1 ]]
|
||||||
|
let s:p.tabline.right = copy(s:p.normal.right)
|
||||||
let s:p.normal.error = [[ g:cRed, g:cLightBg ]]
|
let s:p.normal.error = [[ g:cRed, g:cLightBg ]]
|
||||||
let s:p.normal.warning = [[ g:cYellow, g:cLightBg ]]
|
let s:p.normal.warning = [[ g:cYellow, g:cLightBg ]]
|
||||||
|
|
||||||
let s:p.tabline.left = [[ g:cGray2, g:cLightBg ]]
|
|
||||||
let s:p.tabline.tabsel = [[ g:cWhite, g:cDarkBg ]]
|
|
||||||
let s:p.tabline.middle = [[ g:cGray2, g:cLightBg ]]
|
|
||||||
let s:p.tabline.right = [[ g:cWhite, g:cDarkBg ]]
|
|
||||||
|
|
||||||
let g:lightline#colorscheme#darkcloud#palette = lightline#colorscheme#fill(s:p)
|
let g:lightline#colorscheme#darkcloud#palette = lightline#colorscheme#fill(s:p)
|
||||||
endif
|
endif
|
||||||
"}}}
|
"}}}
|
||||||
|
|
|
@ -43,45 +43,17 @@ if (vim.g.enablecompletion == 1) then
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
|
|
||||||
["<Del>"] = cmp.mapping.abort(),
|
["<Leader>"] = cmp.mapping.abort(),
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{
|
{ name = "buffer" },
|
||||||
name = "snippy",
|
{ name = "treesitter" },
|
||||||
priority = 4
|
{ name = "omni" },
|
||||||
},
|
{ name = "async_path" },
|
||||||
|
{ name = "tags", option = { current_buffer_only = true } },
|
||||||
{
|
{ name = "snippy" },
|
||||||
name = "async_path",
|
|
||||||
priority = 3
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "buffer",
|
|
||||||
priority = 3,
|
|
||||||
max_item_count = 5
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "treesitter",
|
|
||||||
priority = 2,
|
|
||||||
max_item_count = 5
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "omni",
|
|
||||||
priority = 2,
|
|
||||||
max_item_count = 5
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "tags",
|
|
||||||
priority = 1,
|
|
||||||
max_item_count = 5,
|
|
||||||
option = { current_buffer_only = true },
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
enabled = function()
|
enabled = function()
|
||||||
|
|
Loading…
Reference in a new issue