clean .git dirs through .chezmoiignore and update nvim plugins

This commit is contained in:
Julien Rabier 2020-05-30 18:23:25 +02:00
parent f3ba1af1c8
commit a0415b278e
11 changed files with 254 additions and 18 deletions

View File

@ -1,5 +1,6 @@
deploy_dotfiles.sh
**/*.git
.config/**/.git
.config/**/.git/**
{{ if eq .chezmoi.hostname "taupo" }}
.bin
.bin/bat

View File

@ -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'

View File

@ -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

View File

@ -0,0 +1,2 @@
# Empty pyproject.toml to use with some tests that depend on Python 3.6 autodiscovery
# and so on.

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -697,7 +697,8 @@ you can use.
------------------------------------- *airline-denite*
Denite <https://github.com/Shougo/denite.nvim>
No configuration available.
* enable/disable denite integration >
let g:airline#extensions#denite#enabled = 1
------------------------------------- *airline-eclim*
eclim <https://eclim.org>
@ -1257,7 +1258,8 @@ No configuration available.
------------------------------------- *airline-unite*
Unite <https://github.com/Shougo/unite.vim>
No configuration available.
* enable/disable unite integration >
let g:airline#extensions#unite#enabled = 1
------------------------------------- *airline-vimagit*
vimagit <https://github.com/jreybert/vimagit>

View File

@ -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.

View File

@ -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] == '/'

View File

@ -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'*