Compare commits

...

8 commits

10 changed files with 127 additions and 111 deletions

6
.gitmodules vendored
View file

@ -22,18 +22,12 @@
[submodule "vim/bundle/vim-signify"]
path = vim/bundle/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"]
path = vim/bundle/vim-polyglot-darkcloud
url = https://github.com/prurigro/vim-polyglot-darkcloud.git
[submodule "vim/bundle/tabular"]
path = vim/bundle/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"]
path = vim/bundle/ReplaceWithRegister
url = https://github.com/prurigro/ReplaceWithRegister.git

View file

@ -85,7 +85,6 @@ A theme, config and collection of plugins for Neovim
| F4 | ALL | Toggle source code syntax checking |
| | | |
| \` | N | Toggle gutter (left bar with line numbers etc.) |
| Leader+? | N | Toggle the **vim** reference manual |
#### Spell Check
@ -144,8 +143,6 @@ 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-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-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

2
update
View file

@ -216,7 +216,7 @@ fi
[[ -f "$plugin/.git" ]] && {
plugin_dirname="${plugin/*\/}"
grep 'path = ' .gitmodules | grep -oe '[^\/]*$' | grep -qe "$plugin_dirname$" || {
grep 'path = ' .gitmodules | grep -oe '[^\/]*$' | grep -qe "^$plugin_dirname$" || {
[[ -z "$first_found" ]] && {
first_found=1
printf '%s\n' "$cbg_blue $c_reset$cbg_yellow + Removing old plugins: $c_reset"

@ -1 +0,0 @@
Subproject commit 24afe922e6a05891756ecf331f39a1f6743d3d5a

@ -1 +0,0 @@
Subproject commit 6d44a6dc2ec34607c41ec78acf81657248580bf1

View file

@ -19,7 +19,7 @@ endif
"declare the name of our theme
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)
if has("gui_running") || &termguicolors
let l:term = "gui"
@ -59,20 +59,23 @@ endfun
call s:C("Normal",g:cWhite,g:cDarkBg,"")
hi! link Conceal Normal
"cursor
call s:C("Cursor","",g:cDarkBg,"standout")
call s:C("CursorColumn","",g:cLightBg,"")
call s:C("CursorLine","",g:cLightBg,"")
call s:C("CursorLineNr",g:cBlue,g:cLightBg,"bold")
call s:C("LineNr",g:cGray4,"","bold")
"selected text
call s:C("Visual","",g:cDarkBg,"standout")
"vertical split divider
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
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,"")
"menu call
@ -278,7 +281,7 @@ endfun
"}}}
"TREESITTER: {{{
if has('nvim')
if has("nvim")
call s:C("@attribute",g:cRed,"","")
call s:C("@boolean",g:cYellow,"","bold")
call s:C("@character",g:cWhite,"","bold")

View file

@ -1,20 +1,20 @@
if has("gui_running") || &termguicolors
let g:cBlack = '#000000'
let g:cWhite = '#ffffff'
'
let g:cGray1 = '#dadada'
let g:cGray2 = '#c6c6c6'
let g:cGray3 = '#6c6c6c'
let g:cGray4 = '#4e4e4e'
'
let g:cBlue = '#87d7ff'
let g:cRed = '#d75f5f'
let g:cYellow = '#ffd787'
'
let g:cDarkBlue = '#5fafd7'
let g:cDarkRed = '#af5f5f'
let g:cDarkYellow = '#d7af5f'
'
let g:cLightBg = '#303030'
let g:cDarkBg = '#262626'
elseif &t_Co >= 256

View file

@ -54,9 +54,9 @@
" <Esc> | (T) -> leave edit mode
"
" (tabs)
" <Alt-n> | (N) -> go to the next open tab
" <Alt-p> | (N) -> go to the previous open tab
" <Alt-t> | (N) -> open a new tab
" <Ctrl-n> | (N) -> go to the next open tab
" <Ctrl-p> | (N) -> go to the previous open tab
" <Ctrl-t> | (N) -> open a new tab
"
" (split)
" <Ctrl-w>{ | (N) -> rotate counter-clockwise
@ -77,12 +77,13 @@
" # | (N) -> center vertically on nth last search term
"
" (toggles and features)
" <Leader>d | (N) -> VCS vimdiff in a new tab with signify
"
" ik | (N) -> add cursor character as a keyword
" iK | (N) -> remove cursor character as a keyword
"
" ~ | (N) -> popup a command reference
" <Leader><F1> | (N) -> toggle the vim reference manual
" <Leader>? | (N) -> toggle the vim reference manual
" ` | (A) -> toggle the gutter(numbers+folds+signify)
"
" <Space><Space> | (N) -> toggle selected fold
@ -132,12 +133,10 @@
" <Leader>w | (N) -> remove whitespace
" <Tab> | (V) -> indent all the lines currently selected
" <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> | (N) -> un-indent the current line
" <Leader>< | (V) -> un-indent all the lines currently selected
" <Leader>< | (N) -> un-indent the current line
" [<Space> | (N) -> insert a blank line above the current one
" ]<Space> | (N) -> insert a blank line below the current one
"
" (macros)
" ' | (N) -> run a macro
@ -188,9 +187,6 @@
"Filetype Specific Mappings:
" (help)
" q | (A) -> close the dialog
" <Leader>? | (A) -> close the dialog
" ?> | (A) -> close the dialog
" ?< | (A) -> close the dialog
"
" (error/location list)
" <Left> | (A) -> up
@ -217,8 +213,7 @@
noremap > <Nop>
noremap < <Nop>
"-unmapping help from F1 and Ctrl-F1 for use toggling the reference manual
"+the :h topic feature works, and <Leader>? displays quickref
"-unmapping help from F1, Alt-F1 and Ctrl-F1
map <F1> <Nop>
map <A-F1> <Nop>
map <C-F1> <Nop>
@ -375,9 +370,9 @@
"}
"TABS:{
nnoremap <silent><expr> <A-n> ':tabnext<CR>'
nnoremap <silent><expr> <A-p> ':tabprev<CR>'
nnoremap <silent><expr> <A-t> ':tabnew<CR>'
nnoremap <silent><expr> <C-n> ':tabnext<CR>'
nnoremap <silent><expr> <C-p> ':tabprev<CR>'
nnoremap <silent><expr> <C-t> ':tabnew<CR>'
"}
"SPLIT:{
@ -404,6 +399,9 @@
"}
"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
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>'
@ -411,9 +409,6 @@
"toggle the command reference box
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
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>'
@ -516,15 +511,15 @@
"remove trailing whitespace
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
"tab/<Leader>> and untab/<Leader>< the currently selected lines
"tab and untab the currently selected lines
vnoremap <Tab> >gv
nnoremap <Tab> v>gv<Esc>
vnoremap <Leader>> >gv
nnoremap <Leader>> v>gv<Esc>
vnoremap <S-Tab> <gv
nnoremap <S-Tab> v<gv<Esc>
vnoremap <Leader>< <gv
nnoremap <Leader>< v<gv<Esc>
"insert blank lines above and below the current one
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:{
@ -609,8 +604,6 @@
"help
if !&diff
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
"error/location list

View file

@ -1,89 +1,94 @@
function! LLModified()
return &ft =~ 'help' ? '' : &modified ? '*' : &modifiable ? '' : '-'
return &ft =~ "help" ? "" : &modified ? "*" : &modifiable ? "" : "-"
endfunction
function! LLReadonly()
return &ft !~? 'help' && &readonly ? '[RO]' : ''
return &ft !~? "help" && &readonly ? "[RO]" : ""
endfunction
function! LLFilename()
let fname = expand('%:t')
let fname = expand("%:t")
return
\ fname == '__Tagbar__.1' ? g:lightline.fname :
\ &ft == 'qf' ? '[Error/Location List]' :
\ ('' != LLReadonly() ? LLReadonly() . ' ' : '') .
\ ('' != fname ? fname : '[NEW]') .
\ ('' != LLModified() ? ' ' . LLModified() : '')
\ fname == "__Tagbar__.1" ? g:lightline.fname :
\ &ft == "qf" ? "[Error/Location List]" :
\ ("" != LLReadonly() ? LLReadonly() . " " : "") .
\ ("" != fname ? fname : "[NEW]") .
\ ("" != LLModified() ? " " . LLModified() : "")
endfunction
function! LLFugitive()
if expand('%:t') !~? 'Tagbar' && exists('*FugitiveHead')
let mark = '' "edit here for cool mark
if expand("%:t") !~? "Tagbar" && exists("*FugitiveHead")
let mark = ""
let _ = FugitiveHead()
return strlen(_) ? mark._ : ''
return strlen(_) ? mark._ : ""
else
return ''
return ""
endif
endfunction
function! LLFileformat()
return winwidth(0) > 70 ? &fileformat : ''
return winwidth(0) > 70 ? &fileformat : ""
endfunction
function! LLFiletype()
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'none') : ''
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : "none") : ""
endfunction
function! LLFileencoding()
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ""
endfunction
function! LLMode()
let fname = expand('%:t')
let fname = expand("%:t")
return fname == '__Tagbar__' ? 'Tagbar' :
\ winwidth(0) > 60 ? lightline#mode() : ''
return fname == "__Tagbar__" ? "Tagbar" :
\ winwidth(0) > 60 ? lightline#mode() : ""
endfunction
let g:tagbar_status_func = 'TagbarStatusFunc'
let g:tagbar_status_func = "TagbarStatusFunc"
function! TagbarStatusFunc(current, sort, fname, ...) abort
let g:lightline.fname = 'tags'
let g:lightline.fname = "tags"
return lightline#statusline(0)
endfunction
let g:lightline = {
\ 'component_function': {
\ 'fugitive': 'LLFugitive',
\ 'filename': 'LLFilename',
\ 'fileformat': 'LLFileformat',
\ 'filetype': 'LLFiletype',
\ 'fileencoding': 'LLFileencoding',
\ 'mode': 'LLMode'
\ "enable": {
\ "statusline": 1,
\ "tabline": 1
\ },
\
\ 'component_expand': {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok'
\ "component_function": {
\ "fugitive": "LLFugitive",
\ "filename": "LLFilename",
\ "fileformat": "LLFileformat",
\ "filetype": "LLFiletype",
\ "fileencoding": "LLFileencoding",
\ "mode": "LLMode"
\ },
\
\ 'component_type': {
\ 'linter_checking': 'left',
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'left'
\ "component_expand": {
\ "linter_checking": "lightline#ale#checking",
\ "linter_warnings": "lightline#ale#warnings",
\ "linter_errors": "lightline#ale#errors",
\ "linter_ok": "lightline#ale#ok"
\ },
\
\ 'component': {
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}'
\ "component_type": {
\ "linter_checking": "left",
\ "linter_warnings": "warning",
\ "linter_errors": "error",
\ "linter_ok": "left"
\ },
\
\ 'active': {
\ 'left': [[ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ]],
\ 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ], [ 'fileformat', 'fileencoding', 'filetype' ], [ 'percent', 'lineinfo' ]]
\ "component": {
\ "tagbar": "%{tagbar#currenttag('[%s]', '', 'f')}"
\ },
\
\ "active": {
\ "left": [[ "mode", "paste" ], [ "fugitive", "filename" ], [ "tagbar" ]],
\ "right": [[ "linter_checking", "linter_errors", "linter_warnings", "linter_ok" ], [ "fileformat", "fileencoding", "filetype" ], [ "percent", "lineinfo" ]]
\ }
\ }
@ -93,23 +98,20 @@ let g:lightline#ale#indicator_errors = "E:"
let g:lightline#ale#indicator_ok = "OK"
"status bar config with and without powerline fonts (default: 0)
if !exists("g:enablepowerline")
let g:enablepowerline = 0
endif
if (g:enablepowerline == 1)
let g:lightline.separator = { 'left': '', 'right': '' }
let g:lightline.subseparator = { 'left': '', 'right': '' }
let g:lightline.separator = { "left": "", "right": "" }
let g:lightline.subseparator = { "left": "", "right": "" }
else
let g:lightline.separator = { 'left': '', 'right': '' }
let g:lightline.subseparator = { 'left': '|', 'right': '|' }
let g:lightline.separator = { "left": "", "right": "" }
let g:lightline.subseparator = { "left": "|", "right": "|" }
let g:lightline.tabline_subseparator = { "left": "", "right": "" }
endif
"ligtline theme {{{
let s:p = { 'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {} }
let s:p = { "normal": {}, "inactive": {}, "insert": {}, "replace": {}, "visual": {}, "tabline": {} }
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.inactive.left = [[ g:cGray3, g:cDarkBg ], [ g:cGray3, g:cLightBg ]]
@ -121,13 +123,14 @@ endif
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.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.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)
endif
"}}}

View file

@ -43,17 +43,45 @@ if (vim.g.enablecompletion == 1) then
end
end, { "i", "s" }),
["<Leader>"] = cmp.mapping.abort(),
["<Del>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
sources = cmp.config.sources({
{ name = "buffer" },
{ name = "treesitter" },
{ name = "omni" },
{ name = "async_path" },
{ name = "tags", option = { current_buffer_only = true } },
{ name = "snippy" },
{
name = "snippy",
priority = 4
},
{
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()