From 4b92a3fda94f46f8b74e80d0dcaf304246679a89 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 25 Feb 2022 11:49:57 +0100 Subject: [PATCH] home: vim: configure 'null-ls' for 'python' --- home/vim/after/ftplugin/python.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/home/vim/after/ftplugin/python.vim b/home/vim/after/ftplugin/python.vim index e7232a8..a2aebc0 100644 --- a/home/vim/after/ftplugin/python.vim +++ b/home/vim/after/ftplugin/python.vim @@ -1,6 +1,18 @@ " Create the `b:undo_ftplugin` variable if it doesn't exist call ftplugined#check_undo_ft() +" Set-up LSP, linters, formatters +lua << EOF +local null_ls = require("null-ls") +null_ls.register({ + null_ls.builtins.diagnostics.flake8, + null_ls.builtins.diagnostics.mypy, + null_ls.builtins.diagnostics.pylint, + null_ls.builtins.formatting.black, + null_ls.builtins.formatting.isort, +}) +EOF + " Change max length of a line to 88 for this buffer to match black's settings setlocal colorcolumn=88 let b:undo_ftplugin.='|setlocal colorcolumn<'