mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-23 20:14:11 -05:00
Compare commits
No commits in common. "5ebf04080781ae492e758951cca23c79ff20fb02" and "44075669be96bf69db93884aff064c0da8c2595b" have entirely different histories.
5ebf040807
...
44075669be
9 changed files with 75 additions and 36 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -7,6 +7,9 @@
|
||||||
[submodule "vim/bundle/lightline.vim"]
|
[submodule "vim/bundle/lightline.vim"]
|
||||||
path = vim/bundle/lightline.vim
|
path = vim/bundle/lightline.vim
|
||||||
url = https://github.com/itchyny/lightline.vim
|
url = https://github.com/itchyny/lightline.vim
|
||||||
|
[submodule "vim/bundle/tagbar"]
|
||||||
|
path = vim/bundle/tagbar
|
||||||
|
url = https://github.com/majutsushi/tagbar
|
||||||
[submodule "vim/bundle/vim-togglelist"]
|
[submodule "vim/bundle/vim-togglelist"]
|
||||||
path = vim/bundle/vim-togglelist
|
path = vim/bundle/vim-togglelist
|
||||||
url = https://github.com/milkypostman/vim-togglelist.git
|
url = https://github.com/milkypostman/vim-togglelist.git
|
||||||
|
@ -85,6 +88,3 @@
|
||||||
[submodule "vim/bundle/nvim-surround"]
|
[submodule "vim/bundle/nvim-surround"]
|
||||||
path = vim/bundle/nvim-surround
|
path = vim/bundle/nvim-surround
|
||||||
url = https://github.com/kylechui/nvim-surround
|
url = https://github.com/kylechui/nvim-surround
|
||||||
[submodule "vim/bundle/vista.vim"]
|
|
||||||
path = vim/bundle/vista.vim
|
|
||||||
url = https://github.com/liuchengxu/vista.vim
|
|
||||||
|
|
1
init.vim
1
init.vim
|
@ -30,6 +30,7 @@ runtime user.vim
|
||||||
|
|
||||||
"set default values for user settings
|
"set default values for user settings
|
||||||
let g:autostartchecker = get(g:, "autostartchecker", 0)
|
let g:autostartchecker = get(g:, "autostartchecker", 0)
|
||||||
|
let g:autostarttagbar = get(g:, "autostarttagbar", 0)
|
||||||
let g:enabletreesitter = get(g:, "enabletreesitter", 0)
|
let g:enabletreesitter = get(g:, "enabletreesitter", 0)
|
||||||
let g:enablecompletion = get(g:, "enablecompletion", 0)
|
let g:enablecompletion = get(g:, "enablecompletion", 0)
|
||||||
let g:enableautotags = get(g:, "enableautotags", 0)
|
let g:enableautotags = get(g:, "enableautotags", 0)
|
||||||
|
|
11
readme.md
11
readme.md
|
@ -12,7 +12,7 @@ A theme, config and collection of plugins for Neovim
|
||||||
## Optional Requirements
|
## Optional Requirements
|
||||||
|
|
||||||
* **Powerline Fonts**: Required to enable the fancier looking status line
|
* **Powerline Fonts**: Required to enable the fancier looking status line
|
||||||
* **Universal CTags**: Required by _vim-gutentags_ and _vista_, and optional for _nvim-cmp_
|
* **Universal CTags**: Required by _vim-gutentags_, _tagbar_ and optional for _nvim-cmp_
|
||||||
* **Compilers, Linters and Runtimes**: The _ale_ plugin can use compilers, linters and runtimes to provide real-time syntax checking
|
* **Compilers, Linters and Runtimes**: The _ale_ plugin can use compilers, linters and runtimes to provide real-time syntax checking
|
||||||
|
|
||||||
## Distribution Features
|
## Distribution Features
|
||||||
|
@ -33,6 +33,7 @@ A theme, config and collection of plugins for Neovim
|
||||||
|
|
||||||
* **Configure Variables**: The following variables can be added to `local/user.vim` and have their values set to the values you require:
|
* **Configure Variables**: The following variables can be added to `local/user.vim` and have their values set to the values you require:
|
||||||
* `g:autostartchecker`: **1** = Enable the syntax checker when a file is opened | **0** = Check syntax only after being toggled on (default: **0**)
|
* `g:autostartchecker`: **1** = Enable the syntax checker when a file is opened | **0** = Check syntax only after being toggled on (default: **0**)
|
||||||
|
* `g:autostarttagbar`: **1** = Load a file with the tagbar visible | **0** = Require the tagbar to be toggled on (default: **0**)
|
||||||
* `g:enabletreesitter`: **1** = Use treesitter for compatible files | **0** = Keep treesitter disabled (default: **0**)
|
* `g:enabletreesitter`: **1** = Use treesitter for compatible files | **0** = Keep treesitter disabled (default: **0**)
|
||||||
* `g:enablecompletion`: **1** = Enable autocompletion | **0** = Disable autocompletion (default: **0**)
|
* `g:enablecompletion`: **1** = Enable autocompletion | **0** = Disable autocompletion (default: **0**)
|
||||||
* `g:enableautotags`: **1** = Automatically generate tags files | **0** = Disable tag generation (default: **0**)
|
* `g:enableautotags`: **1** = Automatically generate tags files | **0** = Disable tag generation (default: **0**)
|
||||||
|
@ -67,15 +68,15 @@ A theme, config and collection of plugins for Neovim
|
||||||
#### Sidebars
|
#### Sidebars
|
||||||
|
|
||||||
| Binding | Mode | Action |
|
| Binding | Mode | Action |
|
||||||
|-----------------|------|---------------------------------------------|
|
|-----------------|------|-----------------------------------------------|
|
||||||
| F11 or Leader+[ | N | Toggle git history for the current file |
|
| F11 or Leader+[ | N | Toggle git history for the current file |
|
||||||
| F12 or Leader+] | N | Toggle the **vista** symbol and tag sidebar |
|
| F12 or Leader+] | N | Toggle the **tagbar** source code tag sidebar |
|
||||||
| Leader+Leader | N | Toggle the location list for **ale** issues |
|
| Leader+Leader | N | Toggle the location list for **ale** issues |
|
||||||
|
|
||||||
#### Toggles
|
#### Toggles
|
||||||
|
|
||||||
| Binding | Mode | Action |
|
| Binding | Mode | Action |
|
||||||
|-----------------|------|-------------------------------------------------|
|
|-----------------|------|--------------------------------------------------|
|
||||||
| ~ | N | Popup a command list dialog |
|
| ~ | N | Popup a command list dialog |
|
||||||
| | | |
|
| | | |
|
||||||
| F1 | ALL | Toggle line wrapping |
|
| F1 | ALL | Toggle line wrapping |
|
||||||
|
@ -133,6 +134,7 @@ For a complete list of mappings specific to **darkcloud-nvimconfig**, check the
|
||||||
* [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister): Replace text with the contents of a register (for paste+replace without writing over the buffer)
|
* [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister): Replace text with the contents of a register (for paste+replace without writing over the buffer)
|
||||||
* [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim): Simplifies the transition between multiline and single-line code
|
* [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim): Simplifies the transition between multiline and single-line code
|
||||||
* [tabular](https://github.com/godlygeek/tabular): Vim script for text filtering and alignment
|
* [tabular](https://github.com/godlygeek/tabular): Vim script for text filtering and alignment
|
||||||
|
* [tagbar](https://github.com/majutsushi/tagbar): Uses ctags to generate a sidebar of the tags for the current file
|
||||||
* [vim-fugitive](https://github.com/tpope/vim-fugitive): A wrapper integrating git into vim in such a way as to provide features neither of them could offer on their own
|
* [vim-fugitive](https://github.com/tpope/vim-fugitive): A wrapper integrating git into vim in such a way as to provide features neither of them could offer on their own
|
||||||
* [vim-gutentags](https://github.com/xolox/vim-easytags): A plugin that takes care of the much needed management of tags files in Vim
|
* [vim-gutentags](https://github.com/xolox/vim-easytags): A plugin that takes care of the much needed management of tags files in Vim
|
||||||
* [vim-move](https://github.com/matze/vim-move): Provides a few convenient ways to move selected text
|
* [vim-move](https://github.com/matze/vim-move): Provides a few convenient ways to move selected text
|
||||||
|
@ -141,7 +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-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
|
||||||
* [vista.vim](https://github.com/liuchengxu/vista.vim): Viewer & Finder for LSP symbols and tags
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|
1
update
1
update
|
@ -132,6 +132,7 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Neovim Config Update Tool ~~~ $c_reset
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
{
|
{
|
||||||
printf '%s\n%s\n\n' '"Auto-start syntax checking: (1:start toggled on | *0:start toggled off)' '"let g:autostartchecker = 1'
|
printf '%s\n%s\n\n' '"Auto-start syntax checking: (1:start toggled on | *0:start toggled off)' '"let g:autostartchecker = 1'
|
||||||
|
printf '%s\n%s\n\n' '"Auto-start Tagbar: (1:start open | *0:start closed)' '"let g:autostarttagbar = 1'
|
||||||
printf '%s\n%s\n\n' '"Enable Treesitter: (1:treesitter enabled | *0:treesitter disabled)' '"let g:enabletreesitter = 1'
|
printf '%s\n%s\n\n' '"Enable Treesitter: (1:treesitter enabled | *0:treesitter disabled)' '"let g:enabletreesitter = 1'
|
||||||
printf '%s\n%s\n\n' '"Enable Auto-completion: (1:autocompletion enabled | *0:autocompletion disabled)' '"let g:enablecompletion = 1'
|
printf '%s\n%s\n\n' '"Enable Auto-completion: (1:autocompletion enabled | *0:autocompletion disabled)' '"let g:enablecompletion = 1'
|
||||||
printf '%s\n%s\n\n' '"Enable automatic tag generation: (1:enable tag generation | *0:disable automatic tag generation)' '"let g:enableautotags = 1'
|
printf '%s\n%s\n\n' '"Enable automatic tag generation: (1:enable tag generation | *0:disable automatic tag generation)' '"let g:enableautotags = 1'
|
||||||
|
|
1
vim/bundle/tagbar
Submodule
1
vim/bundle/tagbar
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 12edcb59449b335555652898f82dd6d5c59d519a
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f76cecc430003968e6174cae899c2cb2953219b7
|
|
|
@ -95,8 +95,8 @@
|
||||||
"
|
"
|
||||||
" <F11> | (N) -> toggle git commit history
|
" <F11> | (N) -> toggle git commit history
|
||||||
" <Leader>[ | (N) -> toggle git commit history
|
" <Leader>[ | (N) -> toggle git commit history
|
||||||
" <F12> | (N) -> toggle the vista sidebar
|
" <F12> | (N) -> toggle the tagbar sidebar
|
||||||
" <Leader>] | (N) -> toggle the vista sidebar
|
" <Leader>] | (N) -> toggle the tagbar sidebar
|
||||||
" <Leader><Leader> | (N) -> toggle the location list
|
" <Leader><Leader> | (N) -> toggle the location list
|
||||||
"
|
"
|
||||||
" (spellcheck)
|
" (spellcheck)
|
||||||
|
@ -447,9 +447,9 @@
|
||||||
nnoremap <expr><silent> <F11> ':vs<CR>:0Gclog<CR>:wincmd b<CR>'
|
nnoremap <expr><silent> <F11> ':vs<CR>:0Gclog<CR>:wincmd b<CR>'
|
||||||
nnoremap <silent><expr> <Leader>[ ':vs<CR>:0Gclog<CR>:wincmd b<CR>'
|
nnoremap <silent><expr> <Leader>[ ':vs<CR>:0Gclog<CR>:wincmd b<CR>'
|
||||||
|
|
||||||
"bindings to trigger the vista list of tags
|
"bindings to trigger the tagbar list of tags
|
||||||
nnoremap <silent><expr> <F12> ':Vista!!<CR>'
|
nnoremap <silent><expr> <F12> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
||||||
nnoremap <silent><expr> <Leader>] ':Vista!!<CR>'
|
nnoremap <silent><expr> <Leader>] ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
||||||
|
|
||||||
"toggle the location list
|
"toggle the location list
|
||||||
nnoremap <silent><expr> <Leader><Leader> ':call ToggleLocationList()<CR>'
|
nnoremap <silent><expr> <Leader><Leader> ':call ToggleLocationList()<CR>'
|
||||||
|
@ -629,10 +629,23 @@
|
||||||
|
|
||||||
"MAPPINGS DISABLED FOR GIVEN FILETYPES: {{{
|
"MAPPINGS DISABLED FOR GIVEN FILETYPES: {{{
|
||||||
"remove incompatible toggles from specific file types
|
"remove incompatible toggles from specific file types
|
||||||
autocmd Filetype help,qf,diff,vista noremap <buffer> <F11> <Nop>
|
autocmd Filetype help,tagbar,qf noremap <buffer> ` <Nop>
|
||||||
autocmd Filetype help,qf,diff,vista noremap <buffer> <Leader>[ <Nop>
|
autocmd Filetype help,tagbar,qf,diff noremap <buffer> <F9> <Nop>
|
||||||
autocmd Filetype help,qf,diff noremap <buffer> <F12> <Nop>
|
autocmd Filetype help,tagbar,qf,diff noremap <buffer> <C-F9> <Nop>
|
||||||
autocmd Filetype help,qf,diff noremap <buffer> <Leader>] <Nop>
|
autocmd Filetype help,tagbar,qf,diff noremap <buffer> <A-F9> <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf,diff noremap <buffer> <Leader>} <Nop>
|
||||||
|
autocmd Filetype help,qf noremap <buffer> <F10> <Nop>
|
||||||
|
autocmd Filetype help,qf noremap <buffer> <C-F10> <Nop>
|
||||||
|
autocmd Filetype help,qf noremap <buffer> <A-F10> <Nop>
|
||||||
|
autocmd Filetype help,qf noremap <buffer> <Leader>{ <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <F11> <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <C-F11> <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <A-F11>] <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <Leader> <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <F12> <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <C-F12> <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <A-F12> <Nop>
|
||||||
|
autocmd Filetype help,tagbar,qf noremap <buffer> <Leader>[ <Nop>
|
||||||
|
|
||||||
"disable modifier keys with directions that would interfere with logic
|
"disable modifier keys with directions that would interfere with logic
|
||||||
autocmd Filetype qf noremap <buffer> <C-Up> <Nop>
|
autocmd Filetype qf noremap <buffer> <C-Up> <Nop>
|
||||||
|
|
|
@ -10,7 +10,7 @@ function! LLFilename()
|
||||||
let fname = expand("%:t")
|
let fname = expand("%:t")
|
||||||
|
|
||||||
return
|
return
|
||||||
\ fname == "__vista__" ? "" :
|
\ 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]") .
|
||||||
|
@ -18,7 +18,7 @@ function! LLFilename()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFugitive()
|
function! LLFugitive()
|
||||||
if expand("%:t") !~? "__vista__" && exists("*FugitiveHead")
|
if expand("%:t") !~? "Tagbar" && exists("*FugitiveHead")
|
||||||
let mark = ""
|
let mark = ""
|
||||||
let _ = FugitiveHead()
|
let _ = FugitiveHead()
|
||||||
return strlen(_) ? mark._ : ""
|
return strlen(_) ? mark._ : ""
|
||||||
|
@ -42,10 +42,17 @@ endfunction
|
||||||
function! LLMode()
|
function! LLMode()
|
||||||
let fname = expand("%:t")
|
let fname = expand("%:t")
|
||||||
|
|
||||||
return fname == "__vista__" ? "Vista" :
|
return fname == "__Tagbar__" ? "Tagbar" :
|
||||||
\ winwidth(0) > 60 ? lightline#mode() : ""
|
\ winwidth(0) > 60 ? lightline#mode() : ""
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
let g:tagbar_status_func = "TagbarStatusFunc"
|
||||||
|
|
||||||
|
function! TagbarStatusFunc(current, sort, fname, ...) abort
|
||||||
|
let g:lightline.fname = "tags"
|
||||||
|
return lightline#statusline(0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ "enable": {
|
\ "enable": {
|
||||||
\ "statusline": 1,
|
\ "statusline": 1,
|
||||||
|
@ -53,12 +60,12 @@ let g:lightline = {
|
||||||
\ },
|
\ },
|
||||||
\
|
\
|
||||||
\ "component_function": {
|
\ "component_function": {
|
||||||
\ "mode": "LLMode",
|
|
||||||
\ "fugitive": "LLFugitive",
|
\ "fugitive": "LLFugitive",
|
||||||
\ "filename": "LLFilename",
|
\ "filename": "LLFilename",
|
||||||
\ "fileformat": "LLFileformat",
|
\ "fileformat": "LLFileformat",
|
||||||
\ "fileencoding": "LLFileencoding",
|
|
||||||
\ "filetype": "LLFiletype",
|
\ "filetype": "LLFiletype",
|
||||||
|
\ "fileencoding": "LLFileencoding",
|
||||||
|
\ "mode": "LLMode"
|
||||||
\ },
|
\ },
|
||||||
\
|
\
|
||||||
\ "component_expand": {
|
\ "component_expand": {
|
||||||
|
@ -75,8 +82,12 @@ let g:lightline = {
|
||||||
\ "linter_ok": "left"
|
\ "linter_ok": "left"
|
||||||
\ },
|
\ },
|
||||||
\
|
\
|
||||||
|
\ "component": {
|
||||||
|
\ "tagbar": "%{tagbar#currenttag('[%s]', '', 'f')}"
|
||||||
|
\ },
|
||||||
|
\
|
||||||
\ "active": {
|
\ "active": {
|
||||||
\ "left": [[ "mode", "paste" ], [ "fugitive", "filename" ]],
|
\ "left": [[ "mode", "paste" ], [ "fugitive", "filename" ], [ "tagbar" ]],
|
||||||
\ "right": [[ "linter_checking", "linter_errors", "linter_warnings", "linter_ok" ], [ "fileformat", "fileencoding", "filetype" ], [ "percent", "lineinfo" ]]
|
\ "right": [[ "linter_checking", "linter_errors", "linter_warnings", "linter_ok" ], [ "fileformat", "fileencoding", "filetype" ], [ "percent", "lineinfo" ]]
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
|
|
12
vim/config/plugins/tagbar.vim
Normal file
12
vim/config/plugins/tagbar.vim
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
"start the tagbar if g:autostarttagbar is true while not in diff mode
|
||||||
|
if g:autostarttagbar == 1 && !&diff
|
||||||
|
autocmd VimEnter * nested :call tagbar#autoopen(1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:tagbar_sort = 0
|
||||||
|
let g:tagbar_compact = 1
|
||||||
|
let g:tagbar_singleclick = 1
|
||||||
|
let g:tagbar_width = 35
|
||||||
|
let g:tagbar_autofocus = 1
|
||||||
|
|
||||||
|
autocmd FileType tagbar setlocal nocursorcolumn
|
Loading…
Reference in a new issue