All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
095fe0d)
This allows the configuration of the --preview flag in the Vim plugin.
- Vim plugin: prefix messages with `Black: ` so it's clear they come from Black (#3194)
- Docker: changed to a /opt/venv installation + added to PATH to be available to
non-root users (#3202)
- Vim plugin: prefix messages with `Black: ` so it's clear they come from Black (#3194)
- Docker: changed to a /opt/venv installation + added to PATH to be available to
non-root users (#3202)
+- Vim plugin: add flag (`g:black_preview`) to enable/disable the preview style (#3246)
Flag(name="skip_string_normalization", cast=strtobool),
Flag(name="quiet", cast=strtobool),
Flag(name="skip_magic_trailing_comma", cast=strtobool),
Flag(name="skip_string_normalization", cast=strtobool),
Flag(name="quiet", cast=strtobool),
Flag(name="skip_magic_trailing_comma", cast=strtobool),
+ Flag(name="preview", cast=strtobool),
string_normalization=not configs["skip_string_normalization"],
is_pyi=vim.current.buffer.name.endswith('.pyi'),
magic_trailing_comma=not configs["skip_magic_trailing_comma"],
string_normalization=not configs["skip_string_normalization"],
is_pyi=vim.current.buffer.name.endswith('.pyi'),
magic_trailing_comma=not configs["skip_magic_trailing_comma"],
+ preview=configs["preview"],
**black_kwargs,
)
quiet = configs["quiet"]
**black_kwargs,
)
quiet = configs["quiet"]
- `g:black_skip_string_normalization` (defaults to `0`)
- `g:black_virtualenv` (defaults to `~/.vim/black` or `~/.local/share/nvim/black`)
- `g:black_quiet` (defaults to `0`)
- `g:black_skip_string_normalization` (defaults to `0`)
- `g:black_virtualenv` (defaults to `~/.vim/black` or `~/.local/share/nvim/black`)
- `g:black_quiet` (defaults to `0`)
+- `g:black_preview` (defaults to `0`)
To install with [vim-plug](https://github.com/junegunn/vim-plug):
To install with [vim-plug](https://github.com/junegunn/vim-plug):
if !exists("g:black_target_version")
let g:black_target_version = ""
endif
if !exists("g:black_target_version")
let g:black_target_version = ""
endif
+if !exists("g:black_preview")
+ let g:black_preview = 0
+endif
function BlackComplete(ArgLead, CmdLine, CursorPos)
return [
function BlackComplete(ArgLead, CmdLine, CursorPos)
return [