I would like to change the default line length flake8 uses from 79 to 88. I've setup flake8 with null-ls, but it isn't clear how to change the options for flake8 within the lua file.

I've found examples to set options for black by including similar to null-ls.builtins.formatting.black.with({extra_args = {"--line-length 100"}}) and I've tried null-ls.builtins.diagnostics.flake8.with({extra_args = {"--max-line-length 88"}}) without success.

I have finally caved and put a .flake8 file in the directory, which works, but I'd like to have it all in my config file if possible.

Any ideas how I can do this?

1 Answer 1


Realized that multiple items need to be separated by a comma, meaning the correct code is ….bultins.diagnostics.flake8.with({extra_args = {"--max-line-length","88"}})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.