nvim: change pythons style to be more campact

master
tiyn 2 months ago
parent 7931d193b6
commit 4bfc54bcc1

@ -5,14 +5,17 @@ return {
config = function()
require("conform").setup({
formatters_by_ft = {
python = { "isort", "black" },
python = { "isort", "yapf" },
markdown = { "mdformat" },
tex = { "latexindent" },
lua = { "stylua" },
},
})
require("conform").formatters.latexindent = {
prepend_args = { "-y=defaultIndent: ' '" },
args = require("conform.util").extend_args(
require("conform.formatters.latexindent").args,
{ "-y=defaultIndent: ' '" }
),
}
end,
},

@ -15,8 +15,8 @@ return {
-- markdown
require("null-ls").builtins.formatting.mdformat,
-- python
require("null-ls").builtins.formatting.black,
require("null-ls").builtins.formatting.isort,
require("null-ls").builtins.formatting.yapf,
}
})
end
@ -26,11 +26,15 @@ return {
opts = {
automatic_installation = true,
ensure_installed = {
"black",
"isort",
-- latex
"latexindent",
"mdformat",
-- lua
"stylua",
-- markdown
"mdformat",
-- python
"isort",
"yapf",
}
}
}

@ -0,0 +1,6 @@
[style]
based_on_style = google
column_limit = 99
indent_width = 2
spaces_before_comment = 2
continuation_indent_width = 2
Loading…
Cancel
Save