diff --git a/config/lvim/lua/user/options.lua b/config/lvim/lua/user/options.lua index fe0ab45..9177e42 100644 --- a/config/lvim/lua/user/options.lua +++ b/config/lvim/lua/user/options.lua @@ -79,19 +79,31 @@ table.insert(lvim.builtin.alpha.dashboard.section.buttons.entries, -- LSP require("lvim.lsp.null-ls.formatters").setup { - { name = "black" }, + { name = "black", + args = {"-l", "99"} + }, { name = "clang-format", filetype = { "c", "cpp", "cs", "java" }, extra_args = { "--style", "file" } }, - { name = "isort" }, + { name = "isort", + args = { + "-l", "99", + "--profile", "black" + } + }, { name = "yamlfmt" }, } require("lvim.lsp.null-ls.linters").setup { { name = "cmakelint" }, { name = "cpptools" }, - { name = "flake8" }, + { name = "flake8" + args = { + "--max-line-length", "99", + "--extend-ignore", "B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202" + } + }, { name = "markdownlint" }, { name = "pylint" }, { name = "yamllint" }, @@ -100,3 +112,5 @@ require("lvim.lsp.null-ls.linters").setup { lvim.lsp.null_ls.setup.on_init = function(new_client, _) new_client.offset_encoding = "utf-8" end + +lvim.format_on_save.enabled = true