diff options
author | tdro <tdro@users.noreply.github.com> | 2021-10-20 01:54:34 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2021-10-20 01:54:34 -0400 |
commit | cc3cb356ab2fa59fdf39696e2cebefccaf1a2ff3 (patch) | |
tree | 8afce0cbe5ea0520577a4e9375eda4197695bbaf | |
parent | 86e69f00c9bcb802cccc20c8dccea2266a4c89ac (diff) | |
download | dotfiles-cc3cb356ab2fa59fdf39696e2cebefccaf1a2ff3.tar.gz dotfiles-cc3cb356ab2fa59fdf39696e2cebefccaf1a2ff3.tar.bz2 dotfiles-cc3cb356ab2fa59fdf39696e2cebefccaf1a2ff3.zip |
.vimrc: Bring back black and pylint for python
Install flake8 for one offs.
Use python 3.9 in shell.
-rw-r--r-- | .config/nixpkgs/config.nix | 4 | ||||
-rw-r--r-- | .vimrc | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/.config/nixpkgs/config.nix b/.config/nixpkgs/config.nix index 96e82fc..aad40de 100644 --- a/.config/nixpkgs/config.nix +++ b/.config/nixpkgs/config.nix @@ -379,7 +379,7 @@ in Python = pkgs.buildEnv { name = "python"; paths = [ - (python38.withPackages (ps: with ps; [ bandit black mypy pyflakes pylint ])) + (python39.withPackages (ps: with ps; [ bandit black mypy pylint pyflakes flake8 ])) ]; }; @@ -490,7 +490,7 @@ in paths = [ (callPackage ./packages/ruamel.yaml.cmd/default.nix {}) (callPackage ./packages/yaml2nix/default.nix {}) - python38Packages.yamllint + python39Packages.yamllint ]; }; }; @@ -313,6 +313,7 @@ augroup AutoCommands autocmd FileType php autocmd! BufWritePost <buffer> exe 'Notify(''phpcbf ' . expand('%') . ' 2>&1'')' | :e autocmd FileType css autocmd! BufWritePost <buffer> exe 'Notify(''prettier --write --parser css ' . expand('%') . ' 2>&1'')' | :e autocmd FileType html autocmd! BufWritePost <buffer> exe 'Notify(''prettier --write --parser html ' . expand('%') . ' 2>&1'')' | :e + autocmd FileType python autocmd! BufWritePost <buffer> exe 'Notify(''black ' . expand('%') . ' 2>&1 && pylint ' . expand('%') . ' 2>&1'')' | :e autocmd FileType ruby autocmd! BufWritePost <buffer> exe 'Notify(''rufo ' . expand('%') . ' 2>&1 && rubocop ' . expand('%') . ' 2>&1'')' | :e autocmd FileType rust autocmd! BufWritePost <buffer> exe 'Notify(''rustfmt ' . expand('%') . ' 2>&1 && printf "rustfmt OK: ' . expand('%') . '"'')' | :e autocmd FileType json autocmd! BufWritePost <buffer> exe 'Notify(''jsonlint -i ' . expand('%') . ' 2>&1 && printf "JSON OK: ' . expand('%') . '"'')' | :e |