diff --git a/.chezmoiignore b/.chezmoiignore index 422e4f7..14f3c02 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -1,5 +1,6 @@ deploy_dotfiles.sh -**/*.git +.config/**/.git +.config/**/.git/** {{ if eq .chezmoi.hostname "taupo" }} .bin .bin/bat diff --git a/private_dot_config/nvim/init.vim.tmpl b/private_dot_config/nvim/init.vim.tmpl index bb6830f..f60b4c9 100644 --- a/private_dot_config/nvim/init.vim.tmpl +++ b/private_dot_config/nvim/init.vim.tmpl @@ -22,6 +22,7 @@ call minpac#add('tpope/vim-eunuch') command! PackUpdate call minpac#update() command! PackClean call minpac#clean() +let g:netrw_dirhistmax = 0 let g:airline#extensions#tabline#enabled = 1 let g:airline_powerline_fonts = 1 let g:limelight_conceal_ctermfg = 'gray' diff --git a/private_dot_config/nvim/pack/minpac/start/black/tests/data/lines.py b/private_dot_config/nvim/pack/minpac/start/black/tests/data/lines.py new file mode 100644 index 0000000..4c03e43 --- /dev/null +++ b/private_dot_config/nvim/pack/minpac/start/black/tests/data/lines.py @@ -0,0 +1,187 @@ +"""Docstring.""" + + +# leading comment +def f(): + NO = '' + SPACE = ' ' + DOUBLESPACE = ' ' + + t = leaf.type + p = leaf.parent # trailing comment + v = leaf.value + + if t in ALWAYS_NO_SPACE: + pass + if t == token.COMMENT: # another trailing comment + return DOUBLESPACE + + + assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" + + + prev = leaf.prev_sibling + if not prev: + prevp = preceding_leaf(p) + if not prevp or prevp.type in OPENING_BRACKETS: + + + return NO + + + if prevp.type == token.EQUAL: + if prevp.parent and prevp.parent.type in { + syms.typedargslist, + syms.varargslist, + syms.parameters, + syms.arglist, + syms.argument, + }: + return NO + + elif prevp.type == token.DOUBLESTAR: + if prevp.parent and prevp.parent.type in { + syms.typedargslist, + syms.varargslist, + syms.parameters, + syms.arglist, + syms.dictsetmaker, + }: + return NO + +############################################################################### +# SECTION BECAUSE SECTIONS +############################################################################### + +def g(): + NO = '' + SPACE = ' ' + DOUBLESPACE = ' ' + + t = leaf.type + p = leaf.parent + v = leaf.value + + # Comment because comments + + if t in ALWAYS_NO_SPACE: + pass + if t == token.COMMENT: + return DOUBLESPACE + + # Another comment because more comments + assert p is not None, f'INTERNAL ERROR: hand-made leaf without parent: {leaf!r}' + + prev = leaf.prev_sibling + if not prev: + prevp = preceding_leaf(p) + + if not prevp or prevp.type in OPENING_BRACKETS: + # Start of the line or a bracketed expression. + # More than one line for the comment. + return NO + + if prevp.type == token.EQUAL: + if prevp.parent and prevp.parent.type in { + syms.typedargslist, + syms.varargslist, + syms.parameters, + syms.arglist, + syms.argument, + }: + return NO + + +# output + + +"""Docstring.""" + + +# leading comment +def f(): + NO = "" + SPACE = " " + DOUBLESPACE = " " + + t = leaf.type + p = leaf.parent # trailing comment + v = leaf.value + + if t in ALWAYS_NO_SPACE: + pass + if t == token.COMMENT: # another trailing comment + return DOUBLESPACE + + assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" + + prev = leaf.prev_sibling + if not prev: + prevp = preceding_leaf(p) + if not prevp or prevp.type in OPENING_BRACKETS: + + return NO + + if prevp.type == token.EQUAL: + if prevp.parent and prevp.parent.type in { + syms.typedargslist, + syms.varargslist, + syms.parameters, + syms.arglist, + syms.argument, + }: + return NO + + elif prevp.type == token.DOUBLESTAR: + if prevp.parent and prevp.parent.type in { + syms.typedargslist, + syms.varargslist, + syms.parameters, + syms.arglist, + syms.dictsetmaker, + }: + return NO + + +############################################################################### +# SECTION BECAUSE SECTIONS +############################################################################### + + +def g(): + NO = "" + SPACE = " " + DOUBLESPACE = " " + + t = leaf.type + p = leaf.parent + v = leaf.value + + # Comment because comments + + if t in ALWAYS_NO_SPACE: + pass + if t == token.COMMENT: + return DOUBLESPACE + + # Another comment because more comments + assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" + + prev = leaf.prev_sibling + if not prev: + prevp = preceding_leaf(p) + + if not prevp or prevp.type in OPENING_BRACKETS: + # Start of the line or a bracketed expression. + # More than one line for the comment. + return NO + + if prevp.type == token.EQUAL: + if prevp.parent and prevp.parent.type in { + syms.typedargslist, + syms.varargslist, + syms.parameters, + syms.arglist, + syms.argument, + }: + return NO diff --git a/private_dot_config/nvim/pack/minpac/start/black/tests/data/pyproject.toml b/private_dot_config/nvim/pack/minpac/start/black/tests/data/pyproject.toml new file mode 100644 index 0000000..8c5274d --- /dev/null +++ b/private_dot_config/nvim/pack/minpac/start/black/tests/data/pyproject.toml @@ -0,0 +1,2 @@ +# Empty pyproject.toml to use with some tests that depend on Python 3.6 autodiscovery +# and so on. diff --git a/private_dot_config/nvim/pack/minpac/start/vim-airline/CONTRIBUTING.md b/private_dot_config/nvim/pack/minpac/start/vim-airline/CONTRIBUTING.md index f97699e..96d083c 100644 --- a/private_dot_config/nvim/pack/minpac/start/vim-airline/CONTRIBUTING.md +++ b/private_dot_config/nvim/pack/minpac/start/vim-airline/CONTRIBUTING.md @@ -4,17 +4,15 @@ Contributions and pull requests are welcome. Please take note of the following * Adhere to the existing style as much as possible; notably, 2 space indents and long-form keywords. * Keep the history clean! Squash your branches before you submit a pull request. `pull --rebase` is your friend. -* Any changes to the core should be tested against Vim 7.2. +* Any changes to the core should be tested against Vim 7.4. # Bugs Tracking down bugs can take a very long time due to different configurations, versions, and operating systems. To ensure a timely response, please help me out by doing the following: -* Reproduce it with this [minivimrc][7] repository to rule out any configuration conflicts. Even better, create a `gist` of your vimrc that is compatible with [pathogen][11]. -* And to make it easier to reproduce, please supply the following: - * the `:version` of vim - * the commit of vim-airline you're using - * the OS that you're using, including terminal emulator, GUI vs non-GUI +* the `:version` of vim +* the commit of vim-airline you're using +* the OS that you're using, including terminal emulator, GUI vs non-GUI # Themes @@ -26,7 +24,5 @@ Tracking down bugs can take a very long time due to different configurations, ve If you would like to take a more active role in improving vim-airline, please consider [becoming a maintainer][43]. -[7]: https://github.com/bling/minivimrc -[11]: https://github.com/tpope/vim-pathogen [14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots [43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer diff --git a/private_dot_config/nvim/pack/minpac/start/vim-airline/autoload/airline/extensions.vim b/private_dot_config/nvim/pack/minpac/start/vim-airline/autoload/airline/extensions.vim index e78664b..60716b3 100644 --- a/private_dot_config/nvim/pack/minpac/start/vim-airline/autoload/airline/extensions.vim +++ b/private_dot_config/nvim/pack/minpac/start/vim-airline/autoload/airline/extensions.vim @@ -150,12 +150,12 @@ function! airline#extensions#load() call airline#extensions#quickfix#init(s:ext) call add(s:loaded_ext, 'quickfix') - if get(g:, 'loaded_unite', 0) + if get(g:, 'loaded_unite', 0) && get(g:, 'airline#extensions#unite#enabled', 1) call airline#extensions#unite#init(s:ext) call add(s:loaded_ext, 'unite') endif - if get(g:, 'loaded_denite', 0) + if get(g:, 'loaded_denite', 0) && get(g:, 'airline#extensions#denite#enabled', 1) call airline#extensions#denite#init(s:ext) call add(s:loaded_ext, 'denite') endif @@ -444,6 +444,12 @@ function! airline#extensions#load() endif endfor endif + + if exists(':Dirvish') + call airline#extensions#dirvish#init(s:ext) + call add(s:loaded_ext, 'dirvish') + endif + endfunction function! airline#extensions#get_loaded_extensions() diff --git a/private_dot_config/nvim/pack/minpac/start/vim-airline/autoload/airline/extensions/dirvish.vim b/private_dot_config/nvim/pack/minpac/start/vim-airline/autoload/airline/extensions/dirvish.vim new file mode 100644 index 0000000..5ccab97 --- /dev/null +++ b/private_dot_config/nvim/pack/minpac/start/vim-airline/autoload/airline/extensions/dirvish.vim @@ -0,0 +1,39 @@ +" MIT Licsense +" Plugin: https://github.com/justinmk/vim-dirvish +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':Dirvish') + finish +endif + +let s:spc = g:airline_symbols.space + +function! airline#extensions#dirvish#init(ext) abort + call a:ext.add_statusline_func('airline#extensions#dirvish#apply') +endfunction + +function! airline#extensions#dirvish#apply(...) abort + if &filetype ==# 'dirvish' + let w:airline_section_a = 'Dirvish' + + let w:airline_section_b = exists('*airline#extensions#branch#get_head') + \ ? '%{airline#extensions#branch#get_head()}' + \ : '' + + let w:airline_section_c = + \ '%{join(split((execute("lcd"))))}' + \ . s:spc + \ . get(w:, 'airline_section_c', g:airline_section_c) + + let w:airline_section_x = '' + let w:airline_section_y = '' + + let current_column_regex = ':%\dv' + let w:airline_section_z = join(filter( + \ split(get(w:, 'airline_section_z', g:airline_section_z)), + \ 'v:val !~ current_column_regex' + \ )) + endif +endfunction diff --git a/private_dot_config/nvim/pack/minpac/start/vim-airline/doc/airline.txt b/private_dot_config/nvim/pack/minpac/start/vim-airline/doc/airline.txt index 0feaea7..ab60082 100644 --- a/private_dot_config/nvim/pack/minpac/start/vim-airline/doc/airline.txt +++ b/private_dot_config/nvim/pack/minpac/start/vim-airline/doc/airline.txt @@ -697,7 +697,8 @@ you can use. ------------------------------------- *airline-denite* Denite -No configuration available. +* enable/disable denite integration > + let g:airline#extensions#denite#enabled = 1 ------------------------------------- *airline-eclim* eclim @@ -1257,7 +1258,8 @@ No configuration available. ------------------------------------- *airline-unite* Unite -No configuration available. +* enable/disable unite integration > + let g:airline#extensions#unite#enabled = 1 ------------------------------------- *airline-vimagit* vimagit diff --git a/private_dot_config/nvim/pack/minpac/start/vim-go/CHANGELOG.md b/private_dot_config/nvim/pack/minpac/start/vim-go/CHANGELOG.md index 8d45d8d..8ff58cd 100644 --- a/private_dot_config/nvim/pack/minpac/start/vim-go/CHANGELOG.md +++ b/private_dot_config/nvim/pack/minpac/start/vim-go/CHANGELOG.md @@ -9,6 +9,8 @@ IMPROVEMENTS: [[GH-2883]](https://github.com/fatih/vim-go/pull/2883) * Beautify the godoc pop up window border. [[GH-2900]](https://github.com/fatih/vim-go/pull/2900) +* Default `g:go_doc_url` to https://pkg.go.dev. + [[GH-2884]](https://github.com/fatih/vim-go/pull/2884) BUG FIXES: * Fix call to non-existent function in terminal mode edge case. diff --git a/private_dot_config/nvim/pack/minpac/start/vim-go/autoload/go/config.vim b/private_dot_config/nvim/pack/minpac/start/vim-go/autoload/go/config.vim index f6c28fc..8a58080 100644 --- a/private_dot_config/nvim/pack/minpac/start/vim-go/autoload/go/config.vim +++ b/private_dot_config/nvim/pack/minpac/start/vim-go/autoload/go/config.vim @@ -168,8 +168,8 @@ function! go#config#EchoCommandInfo() abort endfunction function! go#config#DocUrl() abort - let godoc_url = get(g:, 'go_doc_url', 'https://godoc.org') - if godoc_url isnot 'https://godoc.org' + let godoc_url = get(g:, 'go_doc_url', 'https://pkg.go.dev') + if godoc_url isnot 'https://pkg.go.dev' " strip last '/' character if available let last_char = strlen(godoc_url) - 1 if godoc_url[last_char] == '/' diff --git a/private_dot_config/nvim/pack/minpac/start/vim-go/doc/vim-go.txt b/private_dot_config/nvim/pack/minpac/start/vim-go/doc/vim-go.txt index 4039f3e..4149506 100644 --- a/private_dot_config/nvim/pack/minpac/start/vim-go/doc/vim-go.txt +++ b/private_dot_config/nvim/pack/minpac/start/vim-go/doc/vim-go.txt @@ -216,7 +216,7 @@ COMMANDS *go-commands* Open the relevant GoDoc in browser for either the word[s] passed to the command or by default, the word under the cursor. By default it opens the - documentation in 'https://godoc.org'. To change it see |'g:go_doc_url'|. + documentation in 'https://pkg.go.dev'. To change it see |'g:go_doc_url'|. *:GoFmt* :GoFmt @@ -1452,9 +1452,9 @@ Maximum height for the GoDoc window created with |:GoDoc|. Default is 20. > *'g:go_doc_url'* godoc server URL used when |:GoDocBrowser| is used. Change if you want to use -a private internal service. Default is 'https://godoc.org'. +a private internal service. Default is 'https://pkg.go.dev'. > - let g:go_doc_url = 'https://godoc.org' + let g:go_doc_url = 'https://pkg.go.dev' < *'g:go_doc_popup_window'*